dc10221203 发表于 2012-3-7 19:34:32

关于不带www 出现403错误——————求解呀

安装LNMP时输入的域名是“b2b114.com”   后面出现域名冲突,编辑/usr/local/nginx/conf/nginx.conf 替换了 "b2b114.com",执行了/usr/local/nginx/sbin/nginx -s reload但是b2b114.com 还是打不开


server
{
listen       80;
server_name b2b114.com www.b2b114.com *.b2b114.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/b2b114.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;
   }
log_formatb2b114.com'$remote_addr - $remote_user [$time_local] $request '
             '$status $body_bytes_sent $http_referer '
             '$http_user_agent $http_x_forwarded_for';
access_log/home/wwwlogs/b2b114.com.logb2b114.com;

licess 发表于 2012-3-7 19:43:13

LNMPA的话还需要修改/usr/local/apache/conf/extra/httpd-vhosts.conf ,ngnx和apache都需要重启
页: [1]
查看完整版本: 关于不带www 出现403错误——————求解呀