LAN Access 403 Forbidden
Posted by: arnb (---.dyn.optonline.net)
Date: September 09, 2022 12:08AM

I want to access the Apache server from another device on the LAN using the local ip address of the Apache Windows machine. I have no desire to access WAMP from the web, nor do I need SSL. When trying this now I get a 403 Forbidden error issued by Apache.

The last time I did this was on a older WAMP version where I simply set WAMP Online or Offline. Now it appears I need a Virtual Host and I'm feeling more than a bit overwhelmed and not understanding what must be done. (Yes I read the docs).

So before I go down adding a VH path, I'm wondering if there is a simple settings modification allowing the current VH to accept LAN messages?

Wampserver 3.2.9 (64 bit) - Apache 2.4.54 - PHP 8.1.10 - MySQL 5.7.39 (don't use Maria) PhpMyAdmin 5.2.0 Windows 11 (64 bit)



Edited 1 time(s). Last edit at 09/09/2022 12:10AM by arnb.

Options: ReplyQuote
Re: LAN Access 403 Forbidden
Posted by: Otomatic (Moderator)
Date: September 09, 2022 09:03AM

Hi,

See Require directive

------------------------------------------------------------------------------------------------------------
Wampserver 3.3.0 32 bit - Apache 2.4.54.2 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.3.0 64 bit - Apache 2.4.54.2 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: LAN Access 403 Forbidden
Posted by: arnb (---.dyn.optonline.net)
Date: September 09, 2022 08:54PM

@Otomatic Thank you.

Changed the Require all denied around line 264-266 in httpd.conf, but still getting 403 Forbidden from another device on the LAN. Restarted WAMP after each change.

Am I in the wrong file or incorrect location within the file?

Tried the following
Require ip 192.168
Require all granted

httpd.conf change

# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
# Require all denied
Require ip 192.168
</Directory>

Options: ReplyQuote
Re: LAN Access 403 Forbidden
Posted by: Otomatic (Moderator)
Date: September 10, 2022 08:52AM

Hi,

No, it is not httpd.conf that needs to be modified, but only the VirtualHost(s) for which you want to allow access from the LAN.

------------------------------------------------------------------------------------------------------------
Wampserver 3.3.0 32 bit - Apache 2.4.54.2 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.3.0 64 bit - Apache 2.4.54.2 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.