huayu 发表于 2010-6-12 15:43:44

添加虚拟主机还是无法把域名指定到目录

/usr/local/nginx/conf/vhost这个目录还是不存在 绑定域名主机头,生成文件是空,wwwoor站点目录存在。
这是什么问题,提示创建已成功!

huayu 发表于 2010-6-12 16:03:41

回复 1# 的帖子

# cd lnmp0.4/
# ./vhost.sh
=========================================================================
Add Virtual Host for LNMP V0.4,Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to add virtual host for nginx
For more information please visit http://www.lnmp.org/

=========================================================================
Please input domain:
(Default domain: www.lnmp.org):xxxx.com www.xxxxxx.com
===========================
domain=xxxx.com www.xxxx.com
===========================
Do you want to add more domain name? (y/n)
n
Please input the directory for the domain:xxxxxx.com www.xxxx.com :
(Default directory: /home/wwwroot/xxxx.com www.xxxx.com):
===========================
Virtual Host Directory=/home/wwwroot/xxx.com www.xxxx.com
===========================
===========================
Allow Rewrite rule? (y/n)
===========================
n
===========================
You choose rewrite=none
===========================
===========================
Allow access_log? (y/n)
===========================
n
===========================
You access log file=.log
===========================

Press any key to start create virtul host...
Create Virtul Host directory......
set permissions of Virtual Host directory......
You select the exist rewrite rule:/usr/local/nginx/conf/none.conf
./vhost.sh: line 136: /usr/local/nginx/conf/vhost/$domain.conf: ambiguous redire
ct
Test Nginx configure file......
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

Restart Nginx......
=========================================================================
Add Virtual Host for LNMP V0.4,Written by Licess
=========================================================================
For more information please visit http://www.lnmp.org/

Your domain:xxxxx.com www.xxx.com
Directory of xxxxx.com www.xxx.com:/home/wwwroot/xxxx.com www.xxx.com

=========================================================================
#

提示 vhost.sh: line 136: ?不明白

[ 本帖最后由 huayu 于 2010-6-12 16:06 编辑 ]

tinyspot 发表于 2010-6-12 16:11:18

Please input domain:
(Default domain: www.lnmp.org):www.xxxxxx.com
===========================
domain= www.xxxx.com
===========================
Do you want to add more domain name? (y/n)
y
Please input the directory for the domain:www.xxxx.comxxxx.com :
(Default directory: /home/wwwroot/要绑定的目录
===========================
Virtual Host Directory=/home/wwwroot/要绑定的目录
===========================
===========================
Allow Rewrite rule? (y/n)
===========================
n
===========================
You choose rewrite=none
===========================
===========================
Allow access_log? (y/n)
===========================
n
===========================
You access log file=.log
===========================

Press any key to start create virtul host...
Create Virtul Host directory......
set permissions of Virtual Host directory......
You select the exist rewrite rule:/usr/local/nginx/conf/none.conf
./vhost.sh: line 136: /usr/local/nginx/conf/vhost/$domain.conf: ambiguous redire
ct
Test Nginx configure file......
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

这样试试    不行就一个域名一个域名的 加

huayu 发表于 2010-6-12 16:18:13

回复 3# 的帖子

果然是目录问题,我不选择,指定目录,使用默认,他只指向绑定域名目录,他没/home/wwwroot/这个目录。谢谢3楼

tinyspot 发表于 2010-6-12 16:22:36

不输绑定的目录   默认目录就是以域名    命名的目录

huayu 发表于 2010-6-12 16:31:17

回复 5# 的帖子

:loveliness: :loveliness: :loveliness:
页: [1]
查看完整版本: 添加虚拟主机还是无法把域名指定到目录