403 Forbidden - IP redirection
Posted by: nk707 (---.customers.d1-online.com)
Date: June 25, 2018 04:34PM

Dear all,

I turned my website online with wamp 3.1.3.
For the website I created a VHost and defined a IP an port for it. I changed the host to require all granted.

When I tried to forward the port 80 in the router, I could just select the IP of the PC and not the IP of the VHost. So when I tried to reach the website from a PC outside the network I get a 403 Forbidden.
(I defined the IP at the DNS of the provider for website bevor that…)

I changed the localhost to required all granted and got the localhost Wamp Server website when I tried to reach the website from the outside. (I changed it immediately back to require local)

How can I link it to the IP of the VHost?

Options: ReplyQuote
Re: 403 Forbidden - IP redirection
Posted by: RiggsFolly (Moderator)
Date: June 25, 2018 04:58PM

Hi

Show us an example of your httpd-vhosts.conf.

There should be no reason to chnage the ip address on the vhost

<VirtualHost *:80>

says use whatever the ip address of this pc is.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: 403 Forbidden - IP redirection
Posted by: nk707 (---.customers.d1-online.com)
Date: June 25, 2018 05:21PM

The IP of the PC is: 192.186.2.107

The VHost file has to hosts:

Virtualhost *:80
Server Name localhost

etc.


Virtualhost 127.168.11.210:80
Server Name xxx
Etc.

The second one has of course a different document root.

Options: ReplyQuote
Re: 403 Forbidden - IP redirection
Posted by: RiggsFolly (Moderator)
Date: June 25, 2018 05:29PM

So change

Virtualhost 127.168.11.210:80

To

Virtualhost *:80


The routers WAN ip address will be 127.168.11.210
The port forwarding in the router will pass all incoming connections on port 80 to the ip address of the PC running WAMPServer and then Apache will be there to accespt the connection.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: 403 Forbidden - IP redirection
Posted by: nk707 (---.dip0.t-ipconnect.de)
Date: June 25, 2018 09:05PM

I solved it - thanks!!!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.