Created
August 16, 2014 13:51
-
-
Save hjue/647dc694dc3b67994202 to your computer and use it in GitHub Desktop.
Justwriting的Nginx配置
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 80; | |
server_name www.justwriting.com; | |
root /data/web/www.justwriting.com; | |
index index.html index.php; | |
# set expiration of assets to MAX for caching | |
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { | |
expires max; | |
log_not_found off; | |
} | |
location ~* \.(md)$ { | |
deny all; | |
} | |
location / { | |
# Check if a file exists, or route it to index.php. | |
try_files $uri $uri/ /index.php$uri?$args; | |
} | |
location ~* \.php { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_split_path_info ^(.+\.php)(/?.*)$; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment