简体   繁体   English

XAMPP服务器上禁止访问-本地主机

[英]Access forbidden on xampp server - localhost

I am totally confused with my problem. 我完全困惑我的问题。 It is not the new one but I can not find the right combination of words and tags for my config - files, because some of the solutions from the same questions here are not working. 这不是新的,但我找不到适合我的config-文件的单词和标签的正确组合,因为此处来自相同问题的某些解决方案不起作用。

I am trying to open the site, which is locally hosted by xampp server from my phone. 我正在尝试打开该站点,该站点由我的手机的xampp服务器本地托管。 The address I am using is : ip:8080/blog.dev:8080 and I am getting 403 - error. 我使用的地址是:ip:8080 / blog.dev:8080,我收到403-错误。

My conf - files: 我的conf-文件:

  1. httpd-vhosts.conf httpd-vhosts.conf

     <VirtualHost *:8080> DocumentRoot "D:/PHP/xampp/htdocs/blog/public" ServerName blog.dev <Directory "D:/PHP/xampp/htdocs/blog/public"> Order Deny,Allow Allow from all Require all granted </Directory> </VirtualHost> 
  2. httpd.conf httpd.conf

     DocumentRoot "D:/PHP/XAMPP/htdocs" <Directory "D:/PHP/XAMPP/htdocs"> Order allow,deny Allow from all Require all granted </Directory> 

I tried to add "Options Indexes FollowSymLinks"but that's not help 我试图添加“选项索引FollowSymLinks”,但这无济于事

Following your logs and the provided link, I'd say that the second port number is "too much". 按照您的日志和提供的链接,我想说第二个端口号“太多”。

Try access your website through http://blog.dev:8080/ . 尝试通过http://blog.dev:8080/访问您的网站。

Hope it helps. 希望能帮助到你。

EDIT 编辑

If the ip is 192.168.1.102, you have to replace the 如果IP为192.168.1.102,则必须替换

127.0.0.1    blog.dev

with that ip in your host file : 在主机文件中使用该ip:

192.168.1.102    blog.dev

And then, access it through http://blog.dev/ . 然后,通过http://blog.dev/访问它。

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

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