我有一个VPS运行NGINX和虚拟主机,configuration如下: 指向它的域名: lolpics.no smscloud.no idmag.no 根文件夹: /home/vds/www/lolpics /home/vds/www/smscloud /home/vds/www/idmag SMSCloud.no是不断获取502错误的网站,但是如果我将域名直接指向任何其他文件夹,则该网站可以正常工作,或者如果我将任何其他域名直接指向/ home / vds / www / smscloud文件夹, 有用。 只有/ home / vds / www / smscloud的smscloud.no中断 我尝试把它放在我的nginx.conf中的http {}之间,并且没有帮助: proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; 编辑:那么,这是愚蠢的,如果任何人从谷歌绊倒在这,这里是我如何解决它,我只是添加到http {}: fastcgi_buffer_size 16k; fastcgi_buffers 16 16k; 所以,我的http块的开始是: http { include /etc/nginx/mime.types; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; fastcgi_buffer_size […]
我有一个安全的网站,我想代理nginx后面。 这可能吗? 怎么样? 所以,这将是这样的: 客户端 – > https – > nginx – > htts – >其他站点 我看到其他人也提出同样的问题,但一直未能find明确的答案。 谢谢! EV
我们用nginxconfiguration了magento,我们试图使用http // magentohost / api / rest来pipe理客户,但是当我们尝试访问那个url时,我得到了404。 只是想知道任何人使用nginxconfigurationmagento REST API的url 我们的configuration server { listen 80; server_name store.magentohost.com; access_log /var/log/nginx/store.magentohost.com.access.log; error_log /var/log/nginx/store.magentohost.com.error.log; root /home/store/public_html; location / { index index.php index.html index.htm; try_files $uri $uri/ @handler; ## if missing pass the URI to magento's front handler expires 30d; ## assume all files are cachable } ## These […]
我有一个redirect循环的问题,反过来由nginx 1.2.1代理的网站。 它看起来像下面的原因(我不知道如何解决) 使用httpfox检查网站,浏览器发送的请求如下所示: https://www.acme.eu/acm/admin/gui_call.php?Object=admin@GuiAdminStartpage&Params[gui]=&action=&no_subtitle=1 我的nginx日志告诉我这个: GET 1/acm/admin/gui_call.php?Object=admin@GuiAdminStartpage¶ms%252525252525252525252525255bgui%252525252525252525252525255d=&action=&no_subtitle=1 HTTP/1.1" HTTP/1.1" 301 486 "https://www.acme.eu/acm/ui/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1" (这一直重复,直到Firefox检测到循环) 对我来说,nginx看起来像是将“gui”的方括号分别改为“252525252525252525252525255b”和“252525252525252525252525255d”。 我认为,因为脚本gui_call.php得到错误的参数,它redirect到/ acm / ui。 / acm / ui用错误的参数调用gui_call.php,依此类推。 如果我的解释是正确的,我怎么能阻止呢? 如果不是,这里发生了什么? 我的网站特定的configuration: proxy_cache_path /var/lib/nginx/proxy/cache/www.acme.eu levels=1:2 keys_zone=www.acme.eu-cache:8m max_size=2000m inactive=600m; # http server{ server_name www.acme.eu; listen 80; access_log /var/log/nginx/access_www.acme.eu_80.log; error_log /var/log/nginx/error_www.acme.eu_80.log; proxy_cache www.acme.eu-cache; proxy_cache_valid 200 […]
有时我需要重新生成我的网站。 我不希望我的用户看到半生成的网站。 我也不希望谷歌看到404错误。 最好的解决办法是当我的系统生成新文件时返回“503”。 是不是? 所以我希望我的系统在生成内容之前将特殊的“locking”文件放在后面,并将其删除。 而我把我的服务器configuration: if(-f $ document_root / lock){return 503; } 我的解决scheme好还是不好? 如果是这样,最好的解决scheme是什么? 也许我可以configurationnginxbuild立TCP连接到我的系统(永久连接),并显示503连接情况下不可用? 这应该会更好,因为我们不需要每次都检查文件系统。 谢谢!
free -m total used free shared buffers cached Mem: 7996 2043 5952 0 73 140 -/+ buffers/cache: 1830 6165 Swap: 7812 15 7797 nginx -v nginx:nginx版本:nginx / 1.0.0 uname -a Linux tr1 2.6.38-gentoo-r6#4 SMP Tue Sep 27 27:24:13 EEST 2011 x86_64 Intel(R)Xeon(R)CPU E5620 @ 2.40GHz GenuineIntel GNU / Linux cat /proc/version Linux版本2.6.38-gentoo-r6(root @ tr1)(gcc版本4.4.5(Gentoo 4.4.5 […]
当浏览器(Windows IE8,9和Windows Chrome(20)和Mac Chrome(20))请求一组图像时,某些图像请求会返回304并正确显示,但其他图像请求会返回200OK并显示一个空白的响应标头,来自页面的图像。 Request URL: http://example.com/statics/images/b_9215b819d9fc2500feb1ec8e12d41f98.jpg Request Method: GET Status Code: 200 OK Request Headersview source Accept: */* Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3 Accept-Encoding: gzip,deflate,sdch Accept-Language: zh-CN,zh;q=0.8 Connection: keep-alive Cookie: remember_user_token=BAhbB1sGaQLoHkkiIiQyYSQxMCRNRjE5UWMydVBUajBYcExHMy93dWdPBjoGRVQ%3D–5d1166be5cabacc37c4b8d246105f4cb9bd35b7b; CNZZDATA3722561=cnzz_eid=41795721-1343110343-&ntime=1343360172&cnzz_a=16&retime=1343360179980&sin=none<ime=1343360179980&rtime=3; _sparrow_session=f9afb2f3c4f87635eca43fc1a94abc85 Host: example.com If-Modified-Since: Fri, 20 Jul 2012 21:06:01 GMT If-None-Match: "b65cefa739e8ac4fb62bc00304962d3c" Referer: http://example.com/guide User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 […]
我有足够的内存和CPU,但Nginx在高stream量显示503错误。 这里是内存使用 total used free shared buffers cached Mem: 3383 3370 12 0 37 3071 -/+ buffers/cache: 260 3122 Swap: 4094 0 4094 此外,CPU使用率从未超过20% top – 13:31:10 up 43 days, 6:47, 3 users, load average: 0.16, 0.19, 0.22 Tasks: 95 total, 1 running, 92 sleeping, 2 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 96.7%id, 3.2%wa, […]
我有一个JSF Web应用程序在Glassfish Application Server上运行。 我正在使用Nginx与Glassfish的反向代理。 我想看看Nginx的性能提升,我正在用JMetertesting应用程序。 当我直接在glassfish上testing应用程序时,没有错误计数。 但是,当我通过Nginx响应testing应用程序包含大量的错误计数约。 %80。 我在nginxconfiguration文件中改变了一些时间,然后没有任何改变。 我的Nginx Conf文件; #user nobody; worker_processes 3; worker_rlimit_nofile 1024; worker_priority -6; #worker_cpu_affinity 01 10; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { multi_accept on; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr – $remote_user [$time_local] "$request" ' # […]
我有一个nginx服务器运行两个IP地址,说1.2.3.4和4.3.2.1 。 除了*.example.net (即wc1 ,指向1.2.3.4 )和*.sub.example.net (即wc2 ,指向4.3.2.1 )外,还有两个通配符SSL证书。 nginx文档提到您可以在server实例之间共享通配符证书,如下所示: ssl_certificate wc1.crt; ssl_certificate_key wc1.key; server { listen 1.2.3.4:443; server_name www.example.net; ssl on; … } server { listen 1.2.3.4:443; server_name test.example.net; ssl on; … } 但是,我想知道这个相同的结构是否可以与第二个通配符证书一起使用。 这两个域名都有大约500个子域名。 不要混淆了,因为ssl_certificate结构现在是全局的吗?