Created
March 28, 2016 13:10
-
-
Save Li-blog/30d07ffaf4b28b9495d1 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 { | |
listen 80; | |
server_name blog.wangjinli.com www.wangjinli.com wangjinli.com; | |
index index.html index.htm index.php default.html default.htm default.php; | |
root /home/wwwroot/www.wangjinli.com; | |
if ($host = 'blog.wangjinli.com';) { | |
rewrite ^/(.*)$ http://wangjinli.com/blog/$1 permanent; | |
} | |
include wordpress.conf; | |
location ~ [^/]\.php(/|$) { | |
try_files $uri =404; | |
fastcgi_pass unix:/tmp/php-cgi.sock; | |
fastcgi_index index.php; | |
include fastcgi.conf; | |
} | |
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { | |
expires 30d; | |
} | |
location ~ .*\.(js|css)?$ { | |
expires 12h; | |
} | |
access_log off; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment