对于作为欧洲电网基础设施(EGI)一部分的项目,我们需要对运行在nginx上的服务进行SSL客户端证书validation。 由于在EGI中允许有多个根CA,我们需要nginx在客户端证书validation期间检查它们。 在nginx的文档中,我只能find参数ssl_client_certificate ,它允许指定一个包含根证书的文件。 有没有一种方法可以在nginx中为客户端证书validation指定多个根CA,或者我必须使用Apache吗?
我注意到服务器上的内存使用率很高。 细节: 操作系统:CentOS 6.3 – x86_64 Web服务器:带有PHP-FPM的Nginx 服务器正在生成PDF文档,所以stream量是最小的。 最佳: # top -b -n 1 -a top – 10:04:51 up 21 days, 18:57, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 92 total, 1 running, 91 sleeping, 0 stopped, 0 zombie Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 99.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 3923092k total, 3720380k used, 202712k […]
可能重复: 如何运行一个cron作业? Server: nginx/0.8.54 OS: Ubuntu 11.04 Host: Rackspace UK Cloud Access: Full Root etc 我的云服务器中有一个PHP脚本: /var/www/www.site.com/web/cron_tasks.hash/report.php 我只想每天运行一次这个任务 – 时间并不重要。 如果我能在早上运行,那将是理想的。 另外我如何查看已列出的cron作业列表? 对不起,但我找不到一个Nginx的服务器问题。
我正在使用puppet install中提供的标准auth.conf作为在Nginx下通过乘客运行的puppet master。 但是,对于大部分的目录,文件和certitifcate请求,我得到一个403响应。 ### Authenticated paths – these apply only when the client ### has a valid certificate and is thus authenticated # allow nodes to retrieve their own catalog path ~ ^/catalog/([^/]+)$ method find allow $1 # allow nodes to retrieve their own node definition path ~ ^/node/([^/]+)$ method find allow $1 # […]
我有一个Nginx服务器,不断处理高负载的请求。 我希望能够改变服务器的configuration文件并以零停机时间dynamic重新加载它。 我在shell中运行以下行: httperf –server=127.0.0.1 –port=80 –uri=/ –num-conns=1 –num-calls=10 而当它发送请求我重新加载我的nginxconfiguration。 我已经尝试了以下两个选项: sudo nginx -s reload sudo kill -s HUP [pid] 它们都会导致httperf返回一些错误。 平均而言,在两个好的请求之后,httperf退出并打印它的日志,并附有以下相关的行: Errors: total 1 client-timo 0 socket-timo 0 connrefused 0 connreset 1 我已经在许多地方看到,重装应该是无缝完成的,没有停机时间,但从testing中我看起来不一样。 我的问题是: 我是否以错误的方式进行testing? 为什么我得到这个连接重置? 有没有解决这个问题? 我实际上需要一个负载平衡器,我可以dynamic地添加和删除服务器,任何更好的解决scheme,适合我的问题? 在此先感谢帮助,期待看到一些有见地的答案。
用于部署WSGI应用程序的典型configuration包括作为逆向代理的通用Web服务器(如nginx)后面的WSGI服务器(如uWSGI或Gunicorn)。 我知道有一个反向代理的一个主要原因是有效地提供静态文件。 还有其他的原因吗? 假设我的应用程序只涉及Python代码,并不关心静态内容。 为什么我要在这种情况下需要反向代理? uWSGI和Gunicorn都已经提供了一个能够与客户端接口的asynchronousHTTP服务器。 有没有什么实际情况可以让WSGI HTTP服务器直接暴露给外部世界呢?
http://nginx.org/en/docs/syntax.html上有关“configuration文件度量单位”的nginx文档说: 大小可以以字节,千字节(后缀k和K)或兆字节(后缀m和M) 这是不清楚的,因为千字节正式定义为1000字节,兆字节正式定义为1000000字节,但通常分别表示1024字节和1024 * 1024字节。 在nginxconfiguration文件中究竟使用了多大的千字节? 当文档说默认是1m是1000000或1048576 ?
我使用SPDY模块编译了源代码Nginx 1.4.3。 但是,当启用SPDY时,似乎打破了我的'变化:接受编码'标题。 我的Nginxconfiguration: ./configure –conf-path=/etc/nginx/nginx.conf –pid-path=/var/run/nginx.pid –error-log-path=/var/log/nginx/error.log –http-proxy-temp-path=/var/cache/nginx/proxy_temp –http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp –http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp –http-scgi-temp-path=/var/cache/nginx/scgi_temp –http-log-path=/var/log/nginx/access.log –with-http_ssl_module –prefix=/usr –add-module=./nginx-sticky-module-1.1 –add-module=./headers-more-nginx-module-0.23 –with-http_spdy_module 我的`nginx.conf'文件: user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr – $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log […]
我一直试图设置nginx作为docker的代理。 我有一台运行Ubuntu服务器的笔记本电脑。 现在我在localhost:8080上运行docker,并在http://192.168.1.5:8080/my-webapp-0.1.0-standalone/上为应用程序的主页提供服务。 我这样configurationnginx( 我是从这个页面改编的 ): server { listen 80; server_name nomilkfor.me; rewrite ^(.+?)/?$ http://nomilkfor.me$1 permanent; } server { listen 80; server_name www.nomilkfor.me; root /usr/share/nginx/html; location / { try_files $uri @my-webapp; } location @my-webapp { proxy_pass http://localhost:8080; } } 我可以从我的家庭networking连接到nginx,并看到nginx欢迎屏幕。 我也试过$ sudo netstat -tanpl|grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3264/nginx: worker 我看到nginx正在端口80上听。 但是当我尝试加载nomilkfor.me我得到“Chrome无法连接到nomilkfor.me”的错误。 […]
我们有一些PHP-FPM服务器,当他们需要一个数据库连接时,他们连接到一个HAProxy服务器,它select一个数据库服务器来使用,并打开连接。 当我们然后想要对HAProxy服务器执行一些维护(例如需要HAProxy重启的configuration更改)时,过程如下: 在HAProxy服务器上closuresKeepalived 等待浮动IP转移到备份HAProxy服务器(也运行Keepalived) 等到HAProxy统计报告只有一个连接(我们检查有多less连接) 重新启动HAProxy 重新启动Keepalived 当步骤2发生时,那个时候打开的mysql连接会发生什么? 根据这个TCP会话和IP变化问题 ,连接将被丢弃。 这是真的吗? 如果是这样,可以做些什么来防止这种情况发生? 连接可以以某种方式强制使用服务器的主(非浮动)IP? 我们也有两个运行Keepalived的Nginx服务器的类似设置,我们正在计划进行等效的过程。 如果我们这样做,同样的问题适用 – 当IP移动到另一个服务器时,现有的http连接会发生什么? 我感谢您的帮助。