Skip to content

Instantly share code, notes, and snippets.

@zwf
Created September 24, 2013 06:48
Show Gist options
  • Save zwf/6681150 to your computer and use it in GitHub Desktop.
Save zwf/6681150 to your computer and use it in GitHub Desktop.
a vhost config for nginx form lnmp一键安装包
server
{
listen 80;
server_name www.abc.com abc.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.julejie.com;
location / {
try_files $uri @apache;
}
location @apache {
internal;
proxy_pass http://127.0.0.1:88;
include proxy.conf;
}
location ~ .*\.(php|php5)?$
{
proxy_pass http://127.0.0.1:88;
include proxy.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