0

I'm able to access a local website which is hosted on a laptop, but when I try to access it from mobile phone I get following error on mobile:

Forbidden

You don't have permission to access /site-name on this server.

Apache/2.4.39(Win64) PHP/7.2.18 Server at 192.168.0.100 Port 80

Note:

  1. Access to website from laptop is working fine using http://192.168.0.100/site-name/, http://localhost/site-name/ and http://laptop-name/site-name/ URLs.
  2. From my mobile phone, I try to access website using http://192.168.0.100/site-name/ URL.
  3. Laptop and mobile phone are connected to same router.

I searched for solutions and found, noticeably, these:

WAMP error: Forbidden You don't have permission to access /phpmyadmin/ on this server

Error message "Forbidden You don't have permission to access / on this server"

Forbidden You don't have permission to access / on this server

I tried above solutions, but they didn't work. Above questions and answers seem to address access from same machine, but as I get error while accessing from different one(mobile phone), help me with apt solution.

lupchiazoem
  • 7,658
  • 5
  • 33
  • 41
  • does your website have any kind of authentication system? – ADyson Oct 17 '19 at 15:33
  • @ADyson No, it does not. – lupchiazoem Oct 17 '19 at 15:51
  • Have you tried it on any other device which isn't the laptop it's hosted on? Maybe apache is configured to refuse all remote connections. Or it uses IP whitelisting or something. – ADyson Oct 17 '19 at 15:58
  • Is there a firewall on the laptop? – CD001 Oct 17 '19 at 16:00
  • @ADyson 1. No I didn't try from other system. 2. I, too, suspect apache is refusing(as default configuration/settings) remote connections, but I'm not sure how to allow connections from other than local. May be `Allow from all` or something, but I'm not sure. 3. No white/black listing. 4. There is a firewall, but I had configured it to allow inbound connection on WAMP and Apache httpd process/program/exe file. – lupchiazoem Oct 17 '19 at 16:05
  • @CD001 There is a firewall, but I had configured it to allow inbound connection on WAMP and Apache httpd process/program/exe file. – lupchiazoem Oct 17 '19 at 16:05
  • Not quite sure exactly what rule specifying those apps would result in (I'm not familiar with windows firewall). The key thing with the firewall is to allow inbound HTTP requests on port 80. – ADyson Oct 17 '19 at 16:12
  • @ADyson The rule allows any protocol on any port. – lupchiazoem Oct 17 '19 at 16:13
  • Hm. So basically you don't really have an inbound firewall, in that case, if that's the ruleset. Anyway to be certain, maybe just turn off the firewall temporarily and try, so we can rule it out (or in) completely. – ADyson Oct 17 '19 at 16:15
  • @ADyson In the firewall, I had explicitly made an inbound rule to allow WAMP and Apache httpd programs to allow incoming connections on any protocol and on any port. Turning off firewall is risky I suppose. Highly appreciate being with topic. – lupchiazoem Oct 17 '19 at 16:20
  • 1
    It's only risky if your router doesn't provide a firewall. Normally it does. I don't run any firewall internally on my home lan. The router blocks all inbound traffic from the internet, and I don't allow unknown devices to join the network, and I make sure I have virus scanning etc on the devices which need it – ADyson Oct 17 '19 at 16:36
  • That's a good point. I did as per your suggestion - turned off firewall and in router - allowed traffic from local IPs(my laptop and mobile phone) with all possible ports range. But, still the problem persists - forbidden error message on the phone. – lupchiazoem Oct 18 '19 at 03:07
  • 1
    Ok. But it rules out one factor at least. You need to move onto the Apache config next then. I'm afraid that's not something I'm expert in...but someone here will be. – ADyson Oct 18 '19 at 07:10
  • FYI and update, forbidden access problem is resolved(honestly, I don't know how) but, I get a new error which is reported @ [By default, mobile browsers use HTTPS. How can I force mobile browers(Chrome and Firefox) to use HTTP?](https://stackoverflow.com/questions/58797130/by-default-mobile-browsers-use-https-how-can-i-force-mobile-browerschrome-and). – lupchiazoem Nov 11 '19 at 07:33

0 Answers0