- 终端传媒2011-02-25注册会员3528
Nginx 如何访问ip的时候 不跳转到域名
server
{
listen 173.212.2xx.49;
server_name wwww8.xxx;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/wwww8;include discuz.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}location ~ .*\.(js|css)?$
{
expires 12h;
}log_format wto8.cn '$remote_addr - $remote_user [$time_local] $request '
'$status $body_bytes_sent $http_referer '
'$http_user_agent $http_x_forwarded_for';
access_log /home/wwwlogs/wwww8.xxx.log wwww8.xxx;
}