nginx+apache

log_format xxx.com.log '$remote_addr - $remote_user [$time_local] "$request" '

'$status $body_bytes_sent "$http_referer" '

'"$http_user_agent" $http_x_forwarded_for';

server

{

listen 80;

server_name www.xxx.com xxx.com;

index index.html index.htm index.php default.html default.htm default.php;

root /data/www/xxx.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 /home/wwwlogs/xxx.com.log;

}


你可能感兴趣的:(nginx+apache)