VPS侦探论坛

标题: 关于不带www 出现403错误——————求解呀 [打印本页]

作者: dc10221203    时间: 2012-3-7 19:34
标题: 关于不带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_format  b2b114.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.log  b2b114.com;
作者: licess    时间: 2012-3-7 19:43
LNMPA的话还需要修改/usr/local/apache/conf/extra/httpd-vhosts.conf ,ngnx和apache都需要重启




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4