昨天,我在AWS中build立了自己的第一个Autoscaling组。 我写了一个cloud-init / userdata脚本来安装我的应用程序,我testing了它40次,没有任何错误。 就在我回家之前,它突然停止了工作,新的事例从未变得健康,并在宽限期到期后最终终止。 今天早上我进来发现问题依然存在。 我SSH到一个实例,并看看在cloud-init-output.log文件,并发现以下内容: Err:1 http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu xenial InRelease Could not connect to ap-southeast-2.ec2.archive.ubuntu.com:80 (54.253.131.141), connection timed out [IP: 54.253.131.141 80] Err:2 http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease Unable to connect to ap-southeast-2.ec2.archive.ubuntu.com:http: [IP: 54.253.131.141 80] Err:3 http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease Unable to connect to ap-southeast-2.ec2.archive.ubuntu.com:http: [IP: 54.253.131.141 80] Err:4 http://security.ubuntu.com/ubuntu xenial-security InRelease Cannot initiate the connection […]
我在Ubuntu 16.04 Machine上遇到exception情况。 我安装了LAMP,ufw,fail2ban e现在作为一个DOS保护我安装了mod_evasive。 Mod_evasive似乎没有阻塞任何东西,不会logging任何东西,我在var / log / apache2 / error.logs中看到的唯一日志,当我重新加载页面足够快,以触发它: [evasive20:error] [pid 17849] [client *..***.179:9189] client denied by server configuration:.. 除此之外。 我经历了所有的步骤,创build了一个日志目录,授予权限,重新安装,尝试了所有的东西,但问题似乎并没有被固定在所有! 这是我目前的configuration: <IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 1 DOSSiteCount 5 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 15 #DOSEmailNotify [email protected] #DOSSystemCommand "su – someuser -c '/sbin/… %s …'" DOSLogDir "/var/log/apache2/evasive.log" </IfModule> 任何想法? 编辑:我现在能够看到日志 – […]
当试图在LAMP服务器上安装Phpmyadmin时,有“WARNING”行提示安装程序无法安装CLI版本的PHP模块。 这是Ubuntu 16.04 LTS与Apache 2.4,PHP 7.0.x和Mariadb 10。 运行sudo apt-get install phpmyadmin后,输出的后半部分引起我的关注。 有一堆这样的线: Creating config file /etc/php/7.0/mods-available/gd.ini with new version WARNING: Directory /etc/php/7.0/cli/conf.d doesn't exist, not enabling the module Setting up php-gd (1:7.0+35ubuntu6) … 事实上,/ /etc/php/7.0/cli和/etc/php/7.0/cli/conf.d都不存在。 根据我对消息的解释: 为web PHP安装了php-gd和php-mcrypt,但是不适用于CLI PHP dom,simplexml,wddx,xml,xmlreader,xmlwriter和xsl仅用于CLI,并且全部失败 php7.0-xml,php-xml,php-pear,php-gettext,php7.0-mcrypt,php-phpseclib,php-tcpdf和php-phpmyadmin只需要web模块,而且它们已经安装好了 我试过sudo apt-get install php7.0-cli ,得到: php7.0-cli is already the newest version (7.0.18-0ubuntu0.16.04.1). 所以我想我会删除并重新安装它,但似乎会撕毁所有的PHP,迫使我从本质上重新开始在这个服务器设置(很多工作): $ […]
我有一个运行在Ubuntu 16.04 LTS上的Apache(2.4)web服务器和一个php(7.1)服务器。 我试图build立一个木偶清单,以在Apache服务器上创build一个虚拟主机,然后每当一个PHP服务器请求被networking服务器接收,Apache服务器将代理请求到PHP服务器,然后从文档中读取请求的页面根显示请求页面。 文档根目录由web服务器和php服务器共享。 在php服务器上设置了一个php fpm池来侦听端口9001上来自apache服务器的代理请求。当我运行“puppet agent -t”时,我没有得到任何错误,并且成功创build了虚拟主机。 一旦创build了虚拟主机,然后创build一个名为info.php的php文件,但是由于某种原因,当我打开一个浏览器并在url(example.com/info.php)中键入虚拟主机名时,页。 我在做什么错了? 下面是我使用的木偶清单。 class team::vhost { #Create the base web directory and the vhosts for the wesbite file { ['/var/wwws', '/var/wwws/web']: ensure => 'directory', } #Create non-ssl vhost apache::vhost { 'example.com non-ssl': #ensure => 'absent', servername => 'example.com', serveradmin => '[email protected]', serveraliases => [ 'www.example.com', ], […]
我使用本指南在Apache/2.4.18上设置了mod_evasive : https : mod_evasive 我只将[email protected]更改为root@localhost 。 我第一次使用test.pl它工作,但每剩余时间它只显示HTTP/1.1 400 Bad Request 。 我不确定是否意外地改变了什么,但是这里是我的test.pl #!/usr/bin/perl # test.pl: small script to test mod_dosevasive's effectiveness use IO::Socket; use strict; for(0..100) { my($response); my($SOCKET) = new IO::Socket::INET( Proto => "tcp", PeerAddr=> "127.0.0.1:80"); if (! defined $SOCKET) { die $!; } print $SOCKET "GET /?$_ HTTP/1.0\n\n"; $response = <$SOCKET>; print […]
我想通过SNMP监视几个服务的状态。 该手册说: proc NAME [MAX [MIN]] monitors the number of processes called NAME (as reported by "/bin/ps -e") running on the local system. 所以我把这些行添加到/etc/snmp/snmpd.conf : proc smbd proc nfsd 但相应的OID仍然返回零: iso.3.6.1.4.1.2021.2.1.100.4 = INTEGER: 0 iso.3.6.1.4.1.2021.2.1.100.5 = INTEGER: 0 allthough ps -e显示smbd和nfsd进程: > ps -e | grep "smbd\|nfsd" 8267 ? 00:00:01 smbd 10179 ? 00:00:04 smbd […]
我的服务器运行在基于mdadm的4 dIsk软件raid 10上。 伯爵今天发生了一次小停电,closures了服务器,现在只能启动InItrd应急系统(ubuntu 16.04),对四个dIsks中的两个发生“可能过时”的抱怨。 四个dIsks之间的事件有一个微妙的差异。 两个有6531个事件,两个6527个事件。 我试图强有力地重新组合起来: mdadm –assemble /dev/md0 /dev/sdb /dev/sdc /dev/sdd /dev/sde –force -v 以及无限的力量: mdadm –assemble /dev/md0 /dev/sdb /dev/sdc /dev/sdd /dev/sde -v 它始终抱怨过时的经验不合时宜。 我怎么能让mdadm忽略事件中的小dIfference? 这里是输出: root@ubuntu:/home/ubuntu# mdadm –examine /dev/sdc /dev/sdc: Magic : a92b4efc Version : 1.2 Feature Map : 0x1 Array UUID : 8397999f:cd6b31f4:64d31961:759bded9 Name : debian:0 Creation Time : Thu […]
我们在安装了iperf的客户端上安装了一个linux框(Raspberry Pi),我们将其作为客户端运行。 我们还在云端运行Ubuntu 16.04的xxxx虚拟机箱 当我们运行以下命令时: iperf -c <xxxx> 我们得到以下内容: ———————————————————— Client connecting to <xxxx>, TCP port 5001 TCP window size: 43.8 KByte (default) ———————————————————— [ 3] local 192.168.30.11 port 34893 connected with <xxxx> port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 63.9 MBytes 53.5 Mbits/sec 几乎每次我们手动运行50Mbits / sec的数量时,我们都能够获得类似的结果。 由于该网站运行在五千万线上,这是在期望之内。 但是,当我们运行以下命令时: */5 * […]
重新生成新的主机的SSL使用相同的site.conf文件只是新* .crt(validation指向正确)apache重新启动没有错误错误日志显示没有错误(超时)端口443是打开 netstat -a | grep https tcp6 0 0 [::]:https [::]:* LISTEN netstat -lnp|grep 443 tcp6 0 0 :::443 :::* LISTEN 1644/apache2 ps waux |grep 1644 root 1644 0.0 0.4 418960 35564 ? Ss 23:32 0:00 /usr/sbin/apache2 -k start 并在编辑我的ports.conf文件后显示IPv4: <IfModule ssl_module> Listen my.server.ip.add:443 </IfModule> <IfModule mod_gnutls.c> Listen my.server.ip.add:443 </IfModule> netstat -lnp | grep […]
我试图在一个Ubuntu 16.04安装上设置多个网站,到目前为止已经安装了LAMP和SSL(Letsencrypt)的Ubuntu。 Ubuntu 16.04 PHP 7.0 的Apache2 MariaDB的 问题:第一个域(website1.com)指向正确的文件夹(var / www / html / website1),但我的第二个域(website2.com)指向第一个(var / www / html / website1)。 我创build了/etc/apache2/sites-available/website1.conf和/etc/apache2/sites-available/website2.conf文件,configuration如下: Website1.conf <IfModule mod_ssl.c><VirtualHost *:443> ServerAdmin [email protected] ServerName website1.com ServerAlias www.website1.com DocumentRoot /var/www/html/website1 <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/html/website1> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> […]