#user nobody; worker_processes 4; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; worker_rlimit_nofile 102400; events { use epoll; worker_connections 102400; } http { include 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"'; ssi on; ssi_silent_errors on; ssi_types test/shtml application/octet-stream application/json; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; gzip_min_length 1k; #proxy balance upstream clouduser{ server 10.13.0.242:8080; } upstream cloudadmin{ server 10.13.0.242:8081; } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } server { listen 80; server_name scs.woniu.com; root /opt/snail-tg/snail-cloud-admin; location / { index index.html; } location ~ ^/cloud/admin/(.*)$ { proxy_pass http://cloudadmin; proxy_pass_header X-Requested-With; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; expires -1; } } server { listen 80; server_name yun.woniu.com; root /opt/snail-tg/snail-cloud; location / { index index.html; } location ~ ^/cloud/user/(.*)$ { proxy_pass http://clouduser; proxy_pass_header X-Requested-With; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 18000; proxy_send_timeout 18000; proxy_read_timeout 18000; expires -1; } } }
相关推荐
nginx配置 nginx配置文件参考 nginx配置文件参考
一个完整的nginx配置文件范例参考(含负载均衡)。学习,支持开源,支持nginx
k8s-修改ingress-nginx-controller中nginx配置文件参数参考
对nginx转发配置参考,nginx转发,Windows下开机自启动,将Nginx转换为Windows服务,这样就可以在开机时自动启动Nginx了。
主要介绍了Nginx配置SSL自签名证书的方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
nginx配置文件说明[参考].pdf
这是个人工作中总结的一些企业级应用Nginx配置的案例,供各位Nginx学习中参考使用!
nginx进行负载均衡的配置参考示例,及nginx支持https请求的配置参考示例
设置后你的操作系统和Nginx可以处理比“ulimit -a”更多的文件,所以把这个值设高,这样nginx就不会有“too many open files”问题了。 worker_rlimit_nofile 100000; #全局错误日志及PID文件 #error_log logs/...
nginx自定义配置参考文件
Linux下应用安装.docx memcached安装.txt ...nginx配置参考 Nginx_简介.doc nginx-0.7.66.tar.gz memcached-1.4.5.tar.gz libevent-1.4.14a-stable.tar.gz pcre-8.02.tar.gz cronolog-1.6.2.tar.gz
主要介绍了Nginx配置如何区分PC或手机访问不同域名,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
django项目部署所使用的nginx,uwsgi配置文件,nginx配置文件,以及详细的配置教程,不会部署的可以参考
其内容参考nginx官方文档 需要注意的配置: nginx=”/usr/local/nginx/sbin/nginx” //修改成nginx执行程序的路径。 NGINX_CONF_FILE=”/usr/local/nginx/conf/nginx.conf” //修改成nginx.conf文件的路径。 保存后...
Nginx的详细配置步骤,解决高并发访问问题,供大家参考使用
nginx配置方案[参考].pdf
从生产环境拉下来的欢迎参考
openerp+nginx配置方法, 非常详细的资料,可以参考使用。