Created
April 24, 2016 14:00
-
-
Save jfengq/654fd198ba63876fbdb9464c0442ccce to your computer and use it in GitHub Desktop.
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 { | |
server_name domainname.com www.domainname.com; | |
root /var/www/; | |
listen 80; | |
index index.html index.htm index.php; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~* \.(css|js|png|jpg|jpeg|gif|ico)$ { | |
expires 1d; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment