试图找出修补openssl对Heartbleed后,应该重新启动服务。 至less有一个post提到重启: sshd,apache,nginx,postfix,dovecot,courier,pure-ftpd,bind,mysql 有没有一个命令可以运行,看看哪些运行的服务依赖于openssl? 是否有一个命令来运行对Apache / Nginx的修补程序是否是活动的,所以服务不需要重新启动? 我们是否应该安排停机时间并重新启动每台服务器? 编辑: 这个postbuild议使用: lsof -n | grep ssl | grep DEL lsof -n | grep ssl | grep DEL lsof -n | grep ssl | grep DEL来显示仍然使用标记为删除的旧版本OpenSSL的进程
我已经运行了YOURLS服务器来为我的公司提供简短的URL,以便我们可以向客户提供简短的URL。 我使用nginx,并为域的根,如果他们不使用适当的短url我想redirect到我们的网站。 因此,example.com/218aredirect到任何简短的url指向,但example.com去我们的网站@ domain.com。 现在,我正在使用一个index.html页面,只是一个元刷新redirect,但我想我应该能够在nginxconfiguration中做到这一点,它可能会更好。 有人可以帮助我,如果可能的话,在服务器级而不是使用元刷新发生? 我已经尝试了一些我在这里find的例子,但是没有一个能够工作。 这是我的configuration文件供参考。 server { server_name www.domain.com; return 301 $scheme://domain.com$request_uri; } server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm index.php; # Make site accessible from http://localhost/ server_name http://domain.com; location / { #YOURLS try_files $uri $uri/ /yourls-loader.php; } location ~ \.php$ { try_files $uri =404; […]
我在我的Ubunut 12.04上安装了nginx ,我无法更改nginx的根目录, 这是默认的nginxconfiguration文件: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; #root /usr/share/nginx/html; root /var/www index index.html index.htm; server_name localhost; location / { try_files $uri $uri/ =404; } } 我试图改变根/var/www/但是一些它不想改变。 我尝试重新启动nginx但我无法更改根目录。
问 :我希望能够只为那些请求启用基本身份validation,在请求中包含特定的头文件。 使用案例:只对某些客户端请求身份validation,这些客户端的请求通过LB(并且在LB设置的头部上匹配)。 我尝试玩IF指令,但没有奏效。 Anynone有一个小configuration如何完成这个例子?
所以我build立了一个nginx服务器并安装了wordpress和SSL。 该网站在http和https上运行良好,但是当我尝试通过nginx的服务器块将httpredirect到https时,http和https都会导致无限的redirect循环。 这是我的服务器块 server { listen 80; return 301 $server_name$request_uri; listen 443 ssl spdy; root /var/www/wordpress; index index.php index.html index.htm; server_name www.example.com; ssl_session_cache shared:SSL:20m; ssl_session_timeout 10m; spdy_headers_comp 6; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate /etc/ssl/certs/www.example.com.certchain.crt; ssl_certificate_key /etc/ssl/private/www.example.com.key; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header Alternate-Protocol 443:npn-spdy/2; proxy_set_header X-Forwarded-Proto https; access_log /var/log/nginx/example.com.access.log; error_log /var/log/nginx/example.com.error.log; error_page 404 /404.html; error_page 500 […]
我正在使用nginx latest web server 。 我如何检查$remote_addr ip是否在指定的CIDR range并return appropriate error code 。 如果IP不在特定的CIDR IP范围内,我想返回特定的错误代码。 我如何做到这一点的CIDR IP范围 ? 例如 如果remote_addr不在123.123.123.123/24中,则返回444码。
我将Nginx设置为通过执行此操作从一个虚拟主机向多个网站提供服务( 默认的Catchall虚拟主机 ): server { listen 80 default; server_name _; 但是,我的访问日志logging“_”,而不是网站的域名。 我如何configurationNginx来logging主机? 129.221.111.22 – – [31/Aug/2011:01:32:17 +0000] "GET /?p=12 HTTP/1.1" 200 2820 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"
我即将部署一个全新的node.js应用程序,我需要一些帮助来设置它。 我的设置现在的方式如下。 我已经在external_ip:80上运行了Varnish 我有Nginx在internal_ip:80上运行 两个都在80端口,一个内部端口,一个外部监听。 注意:node.js应用程序在WebSockets上运行 现在我有了我的新的node.js应用程序,它将在端口8080上侦听。 我可以清漆设置,它是在nginx和node.js前面。 Varnish必须将websocket代理到端口8080,但是静态文件(如css,js等)必须通过端口80到nignx。 Nginx不支持开箱即用的websockets,否则我会这样安装: 清漆 – > nignx – > node.js
我的服务器受到严重攻击。 大多数请求都是这样来的: 46.43.84.214 – – [15/May/2012:11:21:45 +0400] "GET / HTTP/1.0" 200 65859 "2r4k68998q24ay.ru" "Mozilla/4.0 (compatible; MSIE 4.01; Vonna.com bot)" 所有这些请求的HTTP协议版本是相同的。 我可以以某种方式阻止Web服务器级别的HTTP 1.0请求吗? 我试图消除这个攻击(redirect到一个空文件): if ($server_protocol ~* "HTTP/1.0") { rewrite ^/ http://example.com/white.txt; } 似乎没有太大的帮助,我没有看到日志中的任何这样的redirect。 我使用nginx 1.0.9作为Apache 2.2.3的反向代理。 任何帮助表示赞赏。
我安装了nginx和phpmyadmin。 我使用这些参数设置了一个域来testingphpmyadmin: server { listen 80; server_name example.com; root /usr/share/phpmyadmin; index index.php; fastcgi_index index.php; location ~ \.php$ { include /etc/nginx/fastcgi.conf; fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } } 一切正常(如果我访问域,我可以login到phpmyadmin)。 问题是,它只是为了testingphpmyadmin,现在我想把它移动到我的“默认”网站。 但我无法弄清楚如何在/ phpmyadmin上。 这里是'默认'nginx网站(我想把这个/ phpmyadmin位置)的configuration: server { server_name blabla; access_log /var/log/nginx/$host.access.log; error_log /var/log/nginx/error.log; root /var/www/default; index index.php index.html; location / { try_files $uri $uri/ index.php; } location […]