我的环境是Apache-PHP+MySQL现在可以通过IP:端口的形式成功访问了,请问如何把一个解析好这个服务器的域名绑定到这个IP:端口上,通过实现域名访问网站是不是要改/apache/conf/httpd.conf
我改了,然后重启,发现没绑上,是什么问题,我是这样改的,网上找到的方法我试了都不行
ServerName www.域名.com
NameVirtualHost IP:端口
我改了,然后重启,发现没绑上,是什么问题,我是这样改的,网上找到的方法我试了都不行
ServerName www.域名.com
NameVirtualHost IP:端口
ServerAdmin [email protected]
DocumentRoot "D:/AppServ/www/"
ServerName www.besttrip.cn
ServerAlias www.besttrip.cn
ErrorLog "logs/dummy-host.x-error.log"
CustomLog "logs/dummy-host.x-access.log" common
</VirtualHost><VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/AppServ/www/visabest.cn"
ServerName www.visabest.cn
ErrorLog "logs/dummy-host2.x-error.log"
CustomLog "logs/dummy-host2.x-access.log" common
</VirtualHost>
Include conf/extra/httpd-vhosts.conf把前面的#号给去掉2/打开D:\AppServ\Apache2.2\conf\extra\httpd-vhosts.conf中进行配置如:<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/AppServ/www/"
ServerName www.besttrip.cn
ServerAlias www.besttrip.cn
ErrorLog "logs/dummy-host.x-error.log"
CustomLog "logs/dummy-host.x-access.log" common
</VirtualHost><VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/AppServ/www/visabest.cn"
ServerName www.visabest.cn
ErrorLog "logs/dummy-host2.x-error.log"
CustomLog "logs/dummy-host2.x-access.log" common
</VirtualHost>
Include conf/extra/httpd-vhosts.conf把前面的#号给去掉 一去掉#apacha就reset失败
二楼的信息是不是和三楼重复的?
Include conf/extra/httpd-vhosts.conf把前面的#号给去掉 上面这步不执行直接在httpd.conf 里写下面的是不是也行????????<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/AppServ/www/"
ServerName www.besttrip.cn
ServerAlias www.besttrip.cn
ErrorLog "logs/dummy-host.x-error.log"
CustomLog "logs/dummy-host.x-access.log" common
</VirtualHost>
1/打开-》httpd.conf 文件中的# Virtual hosts
Include conf/extra/httpd-vhosts.conf把前面的#号给去掉 我把# Virtual hosts 前面的#也去掉了,没看清楚,呵呵,我继续调试了