🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
```sh server { listen 80; server_name example.com www.example.com; root /server/www/www_example_com; access_log /server/logs/nginx/www_example_com.log; index index.html index.php; # 设置站点仅至允许 GET、POST 请求 if ($request_method !~* GET|POST) { return 403; } # 启用缓存设置,自定义配置文件 include cache.conf; location / { # 加载请求限制,server区域,需要结合http区块 include limit_req_server.conf; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } # try_files $uri $uri/ /index.php$uri?$query_string; } # types { # application/php php py jsp asp; # } location ~ \.php { fastcgi_pass unix:/server/run/php/phpfpm8.1-tp6.sock; # fastcgi_pass unix:/server/run/php/phpfpm8.0-tp6.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; include fastcgi-tp.conf; } location ~ /\.ht { deny all; } } ```