VPS侦探论坛

 找回密码
 注册
查看: 9735|回复: 9

军哥,新来的请你帮忙!!!

[复制链接]
发表于 2011-3-22 22:26:25 | 显示全部楼层 |阅读模式

我刚安装的虚拟目录,用的/root/vhost.sh命令,第一次建立的www.fa1111.com ,并绑定了发fa1111.com域名,但忘了开启日志,我就把rm /usr/local/nginx/conf/vhost/www.fa1111.com.conf  删掉,重新运行/root/vhost.sh命令重新建立了目录。并绑定了fa1111.com    www.fa2222.com   fa2222.com。

现在的情况是:我装好网站文件以后先用www.fa2222.com访问了一下可以访问,但用www.fa1111.com不能访问,ip解析是对的。


请军哥和各位高手帮忙!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-3-22 22:28:56 | 显示全部楼层


对了,我两次建立的虚拟目录的位置不一样,第一次是在默认的wwwroot下,第二次是在wwwroot / www下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-3-22 22:35:28 | 显示全部楼层

/usr/local/nginx/conf/nginx.conf 和 usr/local/nginx/conf/vhost/域名.conf  有什么区别,各有什么作用
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-3-22 22:37:04 | 显示全部楼层



我感觉是/usr/local/nginx/conf/nginx.conf的问题,不知道应该怎么改,文件里边的

server
        {
                listen       80;
                server_name www.fa1111.com;
                index index.html index.htm index.php;
                root  /home/wwwroot;
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-3-23 09:25:08 | 显示全部楼层

回复 4# 的帖子


/usr/local/nginx/sbin/nginx -t看看有错误没

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

 楼主| 发表于 2011-3-23 09:42:09 | 显示全部楼层

[localhost ~]$ /usr/local/nginx/sbin/nginx -t
[alert]: could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (13: Permission denied)
2011/03/23 09:15:55 [warn] 29152#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /usr/local/nginx/conf/nginx.conf:1
2011/03/23 09:15:55 [warn] 29152#0: conflicting server name "www.fa1111.com" on 0.0.0.0:80, ignored
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
2011/03/23 09:15:55 [emerg] 29152#0: open() "/usr/local/nginx/logs/nginx.pid" failed (13: Permission denied)
configuration file /usr/local/nginx/conf/nginx.conf test failed
 楼主| 发表于 2011-3-23 09:46:32 | 显示全部楼层

server
        {
                listen       80;
                server_name www.fa1111.com;
                index index.html index.htm index.php;
                root  /home/wwwroot;
                  。
                  。
         。
         。
  include vhost/*.conf;
}
这个是nginx.conf的server配置,实际的root应该是root  /home/wwwroot/www/fa1111.com
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-3-23 12:31:48 | 显示全部楼层

回复 6# 的帖子


/usr/local/nginx/logs/error.log  这个文件不存在,touch 一个

你在nginx.conf 中绑定了 www.fa1111.com 就不能再用/root/vhost.sh 再添加
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-3-23 14:04:56 | 显示全部楼层

应该怎样修改呢,默认的nginx.conf是什么内容呢

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

发表于 2011-3-23 16:28:42 | 显示全部楼层

回复 9# 的帖子




随便改个没有绑定过的二级域名就可以
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-20 00:48 , Processed in 0.028544 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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