服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器
我们正在使用trackit作为我们的帮助台。 我们的问题是,一旦trackit向用户发送关于例如票的进展(closures,解决等)的邮件并且收件人已经configuration了他的“不在办公室”自动答复,trackit将该答复追加到机票已经closures时重新打开机票。 有没有办法阻止交换服务器将邮件发送到特定的邮件地址(例如[email protected])。 我发现了一种排除客户端特定邮件地址的方法,但是由于我们有> 3000个雇主,这不是一个真正的select。 或者我可以configurationtrackit忽略这些消息。
如何复制/ var / www / html /两个单独的机器之间有独立的硬盘存储运行Apache Web服务器。 我打算在这两个Apache服务器之间设置负载均衡,并将Nginxconfiguration为这两个Apache服务器的前端,这些文件应该从服务器1同步到服务器2,反之亦然
我刚刚写了一个简单的bash脚本来检查文件系统是否正在写入和删除一个文件,但是当我把它放到Nagios中时,它不会像预期的那样运行。 root@debian:~# cat /usr/lib/nagios/plugins/check_filesys.sh #!/bin/bash # Script que checa se file system consegue escrever/ler arquivos if touch teste.txt && rm teste.txt; then echo OK – Teste OK! exit 0 else echo CRITICAL – Teste de escrita/leitura falhou! exit 2 fi root@debian:~# ls -l /usr/lib/nagios/plugins/check_filesys.sh -rwxrwxrwx 1 root root 217 Feb 5 10:40 /usr/lib/nagios/plugins/check_filesys.sh 我还发现一个debugging脚本,看看是什么问题,这就是输出: 2016-1-5 […]
我已经设置了一个指令caching到nginx中的memdisk: fastcgi_cache_path /dev/shm/nginx levels=1:2 keys_zone=WPCACHE:2048m inactive=480m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; server { #snip other locations… # Pass all .php files onto a php-fpm/php-fcgi server. location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass php; fastcgi_cache WPCACHE; fastcgi_cache_valid 200 480m; add_header X-Cache $upstream_cache_status; fastcgi_cache_methods GET HEAD; fastcgi_cache_bypass $skip_cache; fastcgi_no_cache $skip_cache; […]
我正在使用Cloudflare和nginx geoip指令: geoip_country /usr/local/share/GeoIP/GeoIP.dat; geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat; 他们正在selectIP(因为请求在标题中被标记为转发,因为是pipaddress ),但是将国家显示为SG(cloudflare代理位置)。 反正如果头HTTP_X_FORWARDED_FOR被设置,以获得最终用户的coutnry? <?php if (getenv(HTTP_X_FORWARDED_FOR)) { $pipaddress = getenv(HTTP_X_FORWARDED_FOR); $ipaddress = getenv(REMOTE_ADDR); echo "Your IP address is : ".$pipaddress. " (via proxy $ipaddress) " ; } else { $ipaddress = getenv(REMOTE_ADDR); echo "Your IP address is : $ipaddress"; } $country = getenv(GEOIP_COUNTRY_NAME); $country_code = getenv(GEOIP_COUNTRY_CODE); echo "<br/>Your country […]
我想有一组谷歌计算引擎实例可以访问一个通用的文件系统。 这是可能的,如果是的话如何? 可以假定这些实例都运行着相同的基于Linux的操作系统(在我的情况下是Ubuntu)。 对于通用文件系统,我的意思是一个文件系统,可以通过所有正常的操作系统命令(例如cp , mv , rm等)来访问。
我在FreeBSD的一个监狱里运行一个recursion的DNS服务器,使用pf作为防火墙。 在本地计算机上运行drill @xxx.xxx.xxx.xxx example.com (其中xxx.xxx.xxx.xxx是服务器IP)使我成功查找。 但是,如果我在服务器上同样尝试,无论是在监狱和主机… # drill @localhost example.com Error: error sending query: Could not send or receive, because of network error # drill @xxx.xxx.xxx.xxx example.com Error: error sending query: Could not send or receive, because of network error # drill @127.0.0.1 example.com Error: error sending query: Could not send or receive, because of […]
在我的VPS上,我想阻止某些IP地址访问整个服务器。 我有例如这些网站(文档的根源) /var/www #the VPS website itself /home/eve/www/evesite.com /home/adam/www/adamsite.com 我编辑了'/etc/apache2/apache2.conf'并添加了这个: <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted deny from XXX.XXX.XXX.XXX #IP to ban </Directory> 但是这只适用于'/ var / www'。 我知道我可以去编辑“网站启用”文件夹中的所有conf文件,但我想在一个位置执行此操作。 另外,如果我想阻止整个范围的IP地址,ege 123.123.123。[0-255],我该怎么做?
我们在Amazon AWS的S3存储桶中托pipe了一些xml文件。 Web服务器由Nginx提供支持。 对于一个匹配'/super-shots.xml'的特定URL,Nginx必须通过S3位置进行代理传递: http ://mybucket.s3.amazonaws.com/depth0/depth1/depth2/sitemap.xml 我想要的是这个(Nginxconfiguration): location ~* /super-shots.xml { proxy_pass http://mybucket.s3.amazonaws.com/depth0/depth1/depth2/sitemap.xml; } 结果是一个错误: nginx:[emerg]“proxy_pass”不能在正则expression式给出的位置,或者指定位置内,或者if语句内,或者在“limit_except”块内 如果我不做正则expression式匹配(〜* |〜),则没有语法错误,但是页面返回404.请注意,文件在系统path上不存在。 我曾尝试寻找解决scheme,但大多数处理path作为匹配。 我如何解决这个问题? 现在,我已经完成了一个基于path的代理通行证(在下面给出)。 但是,我想要与URL匹配。 #Nginx Config: location /super-shots { proxy_pass http://mybucket.s3.amazonaws.com/depth0/depth1/depth2/sitemap.xml; } # On file system : Empty directory mkdir $docroot/depth0/depth1/depth2/ nginx -s reload 更新1:基于Alexey Ten的评论。 Nginxconfiguration示例可以在这里find
如果我不停止创build数千个(精确到9000个)SSH进程,我的vServer主机会威胁取消我们的合同。 我不知道他们是否使stream程失效,或者当他们find这些stream程时是否这样。 他们寄给我一份包含数千行文件的文件 sshd 19716 0.0 0.0 0 0 ? Z Jan25 0:00 [sshd] <defunct> sshd 19739 0.0 0.0 0 0 ? Z Jan25 0:00 [sshd] <defunct> sshd 19753 0.0 0.0 0 0 ? Z Jan25 0:00 [sshd] <defunct> sshd 19776 0.0 0.0 0 0 ? Z Jan26 0:00 [sshd] <defunct> 我不知道这是怎么发生的,我想知道一个解决scheme,所以我不会取消再次打开服务器之前! 我唯一能想到的就是我经常连接到服务器,连接非常不稳定。 那么这可能会导致几个星期和几个月的过程中创build一千个过程? 我的服务器可能被黑客入侵吗? […]