VPS侦探论坛

 找回密码
 注册
查看: 5683|回复: 1

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

[复制链接]
发表于 2012-3-7 19:34:32 | 显示全部楼层 |阅读模式

安装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;
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-3-7 19:43:13 | 显示全部楼层


LNMPA的话还需要修改/usr/local/apache/conf/extra/httpd-vhosts.conf ,ngnx和apache都需要重启
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-22 13:31 , Processed in 0.025503 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表