VPS侦探论坛

 找回密码
 注册
查看: 17785|回复: 15

带“www”网址 打不开哦

[复制链接]
发表于 2011-4-27 14:04:35 | 显示全部楼层 |阅读模式

server
        {
                listen       80;
                server_name b2bcc.com www.b2bcc.com *.b2bcc.com;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/b2bcc.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  b2bcc.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/b2bcc.com.log  b2bcc.com;
        }
怎么带“www” 不能访问呀!!!!


http://www.b2bcc.com   打不开     http://b2bcc.com   是可以打开的  不知道那里的问题哦
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-4-27 14:07:13 | 显示全部楼层


老大来 哈
看看哈
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-27 14:14:12 | 显示全部楼层

顶哦 军哥  在那里呢
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-4-27 14:15:21 | 显示全部楼层



中国行业网 顶呀
http://www.b2bcc.com/
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-27 14:20:08 | 显示全部楼层

呵呵  抓狂呀

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2011-4-27 14:33:34 | 显示全部楼层

军哥 来看看撒


呵呵 辛苦哈
发表于 2011-4-27 14:35:22 | 显示全部楼层

apache上帮了没
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-4-27 14:37:37 | 显示全部楼层

原帖由 dc10221203 于 2011-4-27 14:04 发表
server
        {
                listen       80;
                server_name b2bcc.com www.b2bcc.com *.b2bcc.com;
                index index.html index.htm index.php default.html default.htm default ...



这个就是之前nginx 里面conf  域名文件  只有b2bcc.com   带“www ”  就打不开哦
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-4-27 14:43:40 | 显示全部楼层

<VirtualHost *:88>
ServerAdmin webmaster@example.com
php_admin_value open_basedir "/home/wwwroot/b2bcc.com:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/home/wwwroot/b2bcc.com"
ServerName b2bcc.com
ErrorLog "logs/b2bcc.com-error_log"
CustomLog "logs/b2bcc.com-access_log" common
</VirtualHost>


这个是/usr/local/apache/conf/vhost/ 里面文件内容

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-4-27 14:44:24 | 显示全部楼层



/usr/local/nginx/sbin/nginx -t看一下
如果没错误,重启一下nginx
 楼主| 发表于 2011-4-27 14:52:27 | 显示全部楼层

原帖由 licess 于 2011-4-27 14:44 发表
/usr/local/nginx/sbin/nginx -t看一下
如果没错误,重启一下nginx



[root@cnbrandnet ~]#/usr/local/nginx/sbin/nginx -t
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
 楼主| 发表于 2011-4-27 15:02:08 | 显示全部楼层

老大 给看看呗

谢谢 哦
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-4-27 15:16:07 | 显示全部楼层
<VirtualHost *:88>
ServerAdmin webmaster@example.com
php_admin_value open_basedir "/home/wwwroot/b2bcc.com:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/home/wwwroot/b2bcc.com"
ServerName b2bcc.com
ErrorLog "logs/b2bcc.com-error_log"
CustomLog "logs/b2bcc.com-access_log" common
</VirtualHost>

你apache里没帮www的域名
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-4-27 15:19:53 | 显示全部楼层
原帖由 licess 于 2011-4-27 15:16 发表

ServerAdmin webmaster@example.com
php_admin_value open_basedir "/home/wwwroot/b2bcc.com:/tmp/:/var/tmp/:/proc/"
DocumentRoot "/home/wwwroot/b2bcc.com"
ServerName b2bcc.com
ErrorLog "logs/b2bcc.com-er ...


绑定多个域名 怎么不行呀

ServerName b2bcc.com  www.b2bcc.com    重启lnmpa 就出错502

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2011-4-27 15:33:36 | 显示全部楼层
老大帮忙给看看哟

谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-20 08:59 , Processed in 0.044159 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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