Created
July 6, 2015 01:38
-
-
Save henter/6fe995660b9154d977e1 to your computer and use it in GitHub Desktop.
nginx conf
This file contains 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 80; | |
server_name xxx.com; | |
root /var/www/xxx/; | |
error_log /var/log/nginx/xxx.error.log; | |
access_log /var/log/nginx/xxx.access.log; | |
location / { | |
index index.php; | |
try_files $uri $uri/ @rewriteapp; | |
} | |
location @rewriteapp { | |
#for symfony | |
rewrite ^(.*)$ /app_dev.php/$1 last; | |
#fuck thinkphp | |
rewrite ^(.*)$ /index.php?s=$1 last; | |
} | |
location ~ ^/.+?\.php(/|$) { | |
#fastcgi_pass 127.0.0.1:9000; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
add_header pathinfo $fastcgi_path_info; | |
fastcgi_param HTTPS off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment