| |
| #user nobody; |
| worker_processes 1; |
| |
| #error_log logs/error.log; |
| #error_log logs/error.log notice; |
| #error_log logs/error.log info; |
| |
| #pid logs/nginx.pid; |
| |
| |
| events { |
| worker_connections 1024; |
| } |
| |
| |
| 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; |
| |
| server { |
| listen 8008; |
| server_name localhost; |
| |
| location / { |
| root html; |
| index index.html; |
| } |
| |
| location /data { |
| charset gbk,utf-8; |
| autoindex on; |
| autoindex_exact_size off; |
| autoindex_localtime on; |
| limit_rate_after 10m; |
| alias D:\cpc_log_pic_video; |
| allow all; |
| } |
| |
| } |
| |
| |
| # another virtual host using mix of IP-, name-, and port-based configuration |
| # |
| server { |
| listen 9998; |
| server_name localhost; |
| |
| location / { |
| root src/cpc_v1; |
| try_files $uri $uri/ @router; |
| index index.html index.htm; |
| } |
| location @router { |
| rewrite ^.*$ /index.html last; |
| } |
| |
| location /api { |
| proxy_pass http: |
| } |
| } |
| |
| |
| # HTTPS server |
| # |
| #server { |
| # listen 443 ssl; |
| # server_name localhost; |
| |
| # ssl_certificate cert.pem; |
| # ssl_certificate_key cert.key; |
| |
| # ssl_session_cache shared:SSL:1m; |
| # ssl_session_timeout 5m; |
| |
| # ssl_ciphers HIGH:!aNULL:!MD5; |
| # ssl_prefer_server_ciphers on; |
| |
| # location / { |
| # root html; |
| # index index.html index.htm; |
| # } |
| #} |
| |
| } |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战