nginx.conf 浅浅的花香味﹌ 2022-10-02 00:31 21阅读 0赞 [2019独角兽企业重金招聘Python工程师标准>>> ][2019_Python_] ![hot3.png][] #user nobody; worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; worker_rlimit_nofile 65535; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { use epoll; worker_connections 65535; } 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"'; access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; gzip_min_length 1000; gzip_types text/plain text/css text/xml application/x-javascript application/xml application/json; server { listen 80; server_name 120.76.233.70; charset utf-8; access_log logs/ning.access.log main; index index.jsp index.html index.do index.action; #root /home/tomcat/webapps/ROOT/; #location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ #{ # root /home/tomcat/webapps/ROOT/; # expires 7d; #} #location ~ (\.jsp)|(\.do)|(\.action)$ location / { proxy_pass http://localhost:8080/; proxy_redirect off; proxy_set_header HOST $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name xiaovip.com www.xiaovip.com ningvip.com www.ningvip.com; charset utf-8; access_log logs/xiaovip.access.log main; index index.jsp index.html index.do index.action; if ($host != 'www.xiaovip.com') { rewrite ^/(.*)$ http://www.xiaovip.com/$1 permanent; } location / { rewrite ^/(.*)$ /b2g/$1 last; } location ^~ /b2g/ { proxy_pass http://58.62.144.146:8888; } location ~* ^/.+$ { proxy_pass http://58.62.144.146:8888; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name gp.xiao.com; charset utf-8; access_log logs/gp.xiao.access.log main; index index.jsp index.html index.do index.action; location / { proxy_pass http://58.62.144.146:8686; } #location ~* ^/.+$ { # proxy_pass http://58.62.144.146:8686; #} error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name www.xiao.com xiao.com www.ning.com ning.com; charset utf-8; access_log logs/www.ning.access.log main; index index.php; root /var/www/xiao; if ($host != 'www.xiao.com') { rewrite ^/(.*)$ http://www.xiao.com/$1 permanent; } location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; } location ~ /\.ht { deny all; } include /var/www/xiao/stourweb_conf/nginx/*.conf; error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name m.xiao.com; charset utf-8; access_log logs/m.ning.access.log main; index index.php index.html index.htm; root /var/www/xiao/phone; location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } include /var/www/xiao/stourweb_conf/nginx/*.conf; location ~ /uploads/{ root /var/www/xiao; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { # expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name bbs.xiao.com; charset utf-8; access_log logs/bbs.ning.access.log main; index index.php index.html index.htm; root /var/www/discuz; location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name en.xiao.com; charset utf-8; access_log logs/en.ning.access.log main; index index.php index.html index.htm; root /var/www/xiao-en; location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name www.miao.com miao.com; charset utf-8; access_log logs/miao.access.log main; index index.php index.html index.htm; root /var/www/miao; location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name m.miao.com; charset utf-8; access_log logs/m.miao.access.log main; index index.php index.html index.htm; root /var/www/miao/mobile; location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } server { listen 80; server_name jipiao.xiao.com; charset UTF-8; index index.html index.htm; root html/jp; access_log logs/jipiao.access.log main; location / { try_files $uri $uri/ /index.html; #proxy_pass http://114.55.13.89:81; } #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; } } } 转载于:https://my.oschina.net/u/3574106/blog/3052461 [2019_Python_]: https://my.oschina.net/u/2663968/blog/3061697 [hot3.png]: /images/20220113/a93ee1b14c8a427e943987a6133b4b19.png
相关 nginxconf缓存优化配置 nginx的配置问题,采用url路由,如何配置nginx.conf 这个貌似只要定向到index.php就OK了吧。 关键是你框架的Router类够强壮,nginx.c 不念不忘少年蓝@/ 2023年10月11日 18:51/ 0 赞/ 5 阅读
相关 nginxconf配置主页 linux 上修改了nginx.conf 怎么重新加载配置文件生效 1、连接上相应的linux主机,进入到等待输入shell指令的linux命令行状态下。 2、在lin 喜欢ヅ旅行/ 2023年10月11日 18:51/ 0 赞/ 7 阅读
相关 nginxconf文件下载 如何编辑nginx.conf 文件 nginx.conf文件为文本类型的文件,可以用任何文本编辑器进行编辑 注意,在windows下,如果使用记事本进行编辑,文件中不能 怼烎@/ 2023年10月11日 18:51/ 0 赞/ 6 阅读
相关 nginxConf配置详解 \nginx 进程,一般设置为和cpu核数一样; worker\_processes 1; \错误存放日志 error\_log logs/error.log; 约定不等于承诺〃/ 2021年11月23日 08:10/ 0 赞/ 345 阅读
还没有评论,来说两句吧...