我尝试重新启动生产项目,并停止工作。 这是一个django == 1.5.1和django-cms == 2.4.1的项目。 我重新启动,因为我已经从django == 1.4.1项目更新到django == 1.5.1,但只要我知道它不会改变wsgi.ini中的任何东西。 当我第一次重新加载这个项目的时候,它正在发生一个500错误。 然后我决定删除我的/tmp/zecaffe.sock重新创build它,然后重新启动项目,现在当我看到里面我的error_zecaffe.log它显示这个错误: 2013/05/03 16:16:35 [crit] 32378#0: *207 connect() to unix:///tmp/zecaffe.sock failed (2: No such file or directory) while connecting to upstream, client: 189.75.17.67, server: zecaffe.infalms.com.br, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/zecaffe.sock:", host: "zecaffe.infalms.com.br" 2013/05/03 16:16:36 [crit] 32378#0: *207 connect() to unix:///tmp/zecaffe.sock failed (2: No […]
我正在运行nginx 1.2.8版本。 看来下面configuration中的$log和$elog没有展开,结果没有任何logging。 是这个问题,我怎样才能让他们扩大? nginxconfiguration: server { listen xx.xx.xx.xx:80 default; server_name domain.com; set $docroot /home/domain.com/public_html; set $log /home/domain.com/logs/access_log; set $elog /home/domain.com/logs/error_log; root $docroot; error_log $elog; include /etc/nginx/http-backend.conf; } /etc/nginx/http-backend.confconfiguration: ….. location ~* ^.+\.(jpg|jpeg|gif|png|svg|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|ico|swf|txt|tgz|tbz|pdfpls|torrent)$ { root $docroot; try_files $uri @fallback; access_log $log main; error_log $elog; expires 30d; add_header Pragma "public"; add_header Cache-Control "public"; # error_page 404 […]
请帮助我configurationnginx,以便从目录列表中隐藏文件和目录。 设置“Autoindex off”不是一个选项,因为nginx开始显示403错误信息。 我需要的是一个带有目录名称的空白页面。 谢谢。
我们有一个运行Nginx(1.5.2)的Linux机器(Ubuntu 12.04),它作为一个Tornado和Apache主机的反向代理/负载均衡器。 上游服务器在物理上和逻辑上接近(相同的DC,有时是相同的机架)并且在它们之间显示亚毫秒的延迟: PING appserver (10.xx.xx.112) 56(84) bytes of data. 64 bytes from appserver (10.xx.xx.112): icmp_req=1 ttl=64 time=0.180 ms 64 bytes from appserver (10.xx.xx.112): icmp_req=2 ttl=64 time=0.165 ms 64 bytes from appserver (10.xx.xx.112): icmp_req=3 ttl=64 time=0.153 ms 我们每秒接收到大约500个请求的持续负载,而且目前正在从互联网上看到正常的丢包/延迟峰值,即使从基本的ping也是如此: sam@AM-KEEN ~> ping -c 1000 loadbalancer PING 50.xx.xx.16 (50.xx.xx.16): 56 data bytes 64 bytes from loadbalancer: icmp_seq=0 […]
我在一个专用networkingIP的stream浪盒子上安装了CentOS 6。 我可以使用IP ssh到盒子,所以这是工作。 但是,在curl'ing时,我在端口80上收到拒绝连接。 里面有一个非常基本的nginx提供默认的欢迎页面。 从盒子内部curl它的作品。 Vagrant.configure("2") do |config| config.vm.box = "Centos-6.3-minimal" config.vm.box_url = "https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box" config.vm.network :private_network, ip: "192.168.33.44" config.vm.hostname = "local.example.com" config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "–memory", "2048"] end end 以下是我尝试过的一些事情: 更改为端口转发80 – > 8080. localhost:8080curllocalhost:8080只是挂在那里。 尝试另一个IP地址。 没有不同。 在已知可以在0.0.0.0上侦听的服务器上打开python -m SimpleHTTPServer 。 仍然得到连接拒绝。 这些东西是已知的工作: 使用给定的专用networkingIP连接到服务器。 从箱子内部curl起作用。 相同的设置在真实的服务器上工作。 我已经安装了Guest Additions,但是它们的版本在guest和host上是不同的。 这可能是问题所在。 但是为什么SSH工作,而不是端口80? […]
我跟着这个post来服务我的Django项目。 该项目与manage.py runserver运行服务器运行良好,我想设置为生产。 这是我的设置文件: nginx.conf : upstream django { server /tmp/vc.sock; #server 10.9.1.137:8002; } server { listen 8001; server_name 10.9.1.137; charset utf-8; client_max_body_size 25M; location /media { alias /home/deploy/vc/media; } location /static { alias /home/deploy/vc/static; } location / { uwsgi_pass django; include /etc/nginx/uwsgi_params; } } uwsgi.ini : [uwsgi] chdir = /home/deploy/vc wsgi-file = vc/wsgi.py master […]
我从/var/log/nginx/error.log收到以下错误消息: 2014/07/17 08:36:21 [alert] 8206#0: worker process 8207 exited on signal 11 (core dumped) 2014/07/17 08:36:21 [alert] 8206#0: worker process 8210 exited on signal 11 (core dumped) 2014/07/17 08:36:22 [alert] 8206#0: worker process 8208 exited on signal 11 (core dumped) 2014/07/17 08:36:26 [alert] 8206#0: worker process 8209 exited on signal 11 (core dumped) 2014/07/17 08:36:26 […]
每次重启NGINX时,都会留下两个信号量数组。 鉴于信号量是有限的共享资源 – 服务器正在不断地谨慎,尽pipe缓慢,配额限制失败。 重启时留下的信号量由拥有600的权限的“4294967295”(-1)所有。重启之后,他们不希望被传统方式删除,例如: $ sudo ipcrm -s 5111851 cannot remove id 5111851 (Operation not permitted) 有没有人处理过这个问题? 显然,find一种通过NGINXconfiguration来停止数组孤立的方法会是太棒了,但是我不得不修改init.d脚本来清理剩下的信号量数组,所以我似乎无法使用standart ipc *工具删除它们。 有没有办法,重新启动,删除这些信号量arrays分配给一个不存在的用户? $ sudo ipcs -st —— Semaphore Operation/Change Times ——– semid owner last-op last-changed … 9568370 4294967295 Not set Fri Feb 13 03:38:02 2015 <– logrotate 9601139 4294967295 Not set Fri Feb 13 03:38:02 […]
我有一个运行在端口8443上的节点应用程序。我的nginx处理端口80和443上的web请求,并将用户redirect到8443。 这里是我的/etc/nginx/sites-enabled/defaultconfiguration: upstream my_upstream { server 127.0.0.1:8443; keepalive 64; } server { listen 80; server_name myapp.com; rewrite ^/(.*) https://myapp.com/$1 permanent; } server { listen 443 ssl; server_name 12.34.12.34 www.myapp.com myapp.com *.myapp.com; ssl_certificate /path/to/my/cert.crt; ssl_certificate_key /path/to/my/private.key // other ssl params location / { proxy_redirect off; proxy_pass https://my_upstream; // other params } } 有了这个configuration我可以通过访问我的应用程序 http(s)://myapp.com:8443 只有当我添加下面的iptables iptables […]
我正在configurationHAProxy,以便终止SSL,因此只有一个地方可以configuration购买的SSL证书。 不过,我宁愿与后端服务器的连接也使用SSL进行encryption。 我发现的一个build议是在后端服务器上创build自签名证书,然后在每个服务器行上设置“verify none”。 …因此,从浏览器到HAProxy的连接将使用正式购买的SSL证书,但是HAProxy到后端服务器的连接将使用自签名证书。 自签证书的好处是免费,不需要更新和维护(我可以在将来设置到期,避免每年都要安装新版本)。 然而,可以理解的是,这会打开MITM攻击的后端,而且我读过的一些消息并不build议这样做。 我可以configurationHAProxy,以便我可以在后端服务器上使用自签名证书,但可能会将HAProxy服务器上的自签名证书列入白名单? …所以HAProxy到后台连接将被encryption,它不会受到MITM攻击,HAProxy将知道信任来自后端服务器的自签名证书。 我所描述的是可能的吗? 我是HAProxy SSLterminal新手,所以任何意见是赞赏。 我的configuration的相关部分如下: frontend www-in bind *:80 bind *:443 ssl crt /etc/ssl-keys/my-public-ssl-key.pem no-sslv3 mode http default_backend https-backend # force redirect to https redirect scheme https if !{ ssl_fc } backend https-backend balance leastconn server web1 1.1.1.1:443 check ssl verify none server web2 2.2.2.2:443 check ssl […]