简体   繁体   English

除本地主机外,Apache接口不起作用

[英]Apache interface except localhost not working

So I am on Mac and installed apache, php etc. using homebrew. 所以我在Mac上并使用自制软件安装了apache,php等。 In my /etc/apache2/httpd.conf I have Listen 80 . 在我的/etc/apache2/httpd.conf我有Listen 80 I can access documentroot via http://localhost but not via http://192.168.1.6 (this is my local IP) or http://127.0.0.1 . 我可以通过http://localhost来访问documentroot,但不能通过http://192.168.1.6 (这是我的本地IP)或http://127.0.0.1来访问documentroot。 The latter 2 URLs leads to show forbidden error - http://puu.sh/3dTkb.png 后两个URL导致显示禁止的错误-http://puu.sh/3dTkb.png

Can someone help me with this ? 有人可以帮我弄这个吗 ? Been stuck for hours now! 现在被困了几个小时!

Actually this all are same only.you try with your port number apache default portnumber is 8080 .. so url look like this http://192.168.1.6:8080/yourapplication or document check your port number 其实这一切都是相同的。您尝试使用您的端口号apache,默认端口号是8080 ..因此url看起来像这样http://192.168.1.6:8080/yourapplication or document您的应用程序http://192.168.1.6:8080/yourapplication or document检查您的端口号

http://127.0.0.1:8080/urapp

u can use this also . 您也可以使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM