为什么我的apache配置好了后,能通过localhost访问,而不能用ip或计算机名访问呢?谢谢!

carlyle 2003-03-20 02:11:01
用ip或计算机名访问总是出现以下错误:
Forbidden
You don't have permission to access / on this server.


--------------------------------------------------------------------------------

Apache/1.3.26 Server at localhost Port 80
...全文
339 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangjch 2003-03-30
  • 打赏
  • 举报
回复
<VirtualHost yourIP>
..
...
....
</VirtualHost>
就可以用
http://yourIP
访问了
camelxz 2003-03-28
  • 打赏
  • 举报
回复
是 :Listen 127.0.0.1:80
改成:Listen: youip:80
griffith 2003-03-28
  • 打赏
  • 举报
回复
<VirtualHost gapache>
DirectoryIndex index.html index.html.var
ServerAdmin griffith_aya@hotmail.com
DocumentRoot d:\XApache
ServerName gapache
ErrorLog d:\apache2\logs\error_log
CustomLog d:\apache2\logs\access_log common
</VirtualHost>
-----------
其中gapache是我的servername
d:\apache2是安装目录
d:\XApache是我开的虚拟目录

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "D:/Apache2/htdocs"
DocumentRoot "D:/XApache"
------
用http://gapache和http://ip:80可以访问页面。
但http://ip就不行了。

griffith 2003-03-28
  • 打赏
  • 举报
回复
更正:Listen yourip:80
匪六哥 2003-03-20
  • 打赏
  • 举报
回复
绑定IP试试

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧