Last active
June 12, 2019 07:09
-
-
Save bboxwechat/3e106a6edcfcb735475efc8c9a5dae89 to your computer and use it in GitHub Desktop.
tp3.2 server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 8101; | |
| server_name localhost; | |
| root "D:/soft/phpstudy/PHPTutorial/WWW/dev/pcplay_full"; | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root html; | |
| } | |
| location / { | |
| try_files $uri @rewrite; | |
| } | |
| location @rewrite { | |
| set $static 0; | |
| if ($uri ~ \.(css|js|jpg|jpeg|png|gif|ico|woff|eot|svg|css\.map|min\.map)$) { | |
| set $static 1; | |
| } | |
| if ($static = 0) { | |
| rewrite ^/(.*)$ /index.php?s=/$1; | |
| } | |
| } | |
| location ~ /Uploads/.*\.php$ { | |
| deny all; | |
| } | |
| location ~ \.php/ { | |
| if ($request_uri ~ ^(.+\.php)(/.+?)($|\?)) { | |
| } | |
| fastcgi_pass 127.0.0.1:9000; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_NAME $1; | |
| fastcgi_param PATH_INFO $2; | |
| fastcgi_param SCRIPT_FILENAME $document_root$1; | |
| } | |
| location ~ \.php$ { | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include fastcgi_params; | |
| } | |
| location ~ /\.ht { | |
| deny all; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment