apache用8080端口,httpd.conf配置如下:
listen:8080
NameVirtualHost 68.79.159.129:8080
<VirtualHost 68.79.159.129:8080>
DocumentRoot "E:/Program Files/apache/htdocs"
ServerName bbs.example.com
DirectoryIndex index.php index.html default.php index.html.var
</VirtualHost>
为什么这样访问:http://bbs.example.com:8080/不能访问啊,是哪里配置错误了吗?还是要怎么配置呢
不能 啊 为什么啊?
但是我的
localhost:8080可以打开
apache里面的那个域名是给你做参考的 不是让你在浏览器里面输入的 你自己在host文件里面 添加如何内容
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 bbs.example.com
这样就把 bbs.example.com 地址 映射成你自己的本机 的ip地址了
别人也能通过这访问吗? bbs.example.com:8080
追答不能 本机效果 人家访问的话 是用你的IP地址的
追问68.79.159.129 bbs.example.com
改成这样吗?
你修改host文件 只是本地效果 告诉你计算机 访问 bbs.example.com这个域名的时候 就是访问自己明白了吧
本回答被提问者采纳