403 Forbidden error
Posted by: PaulGh (---.rdsnet.ro)
Date: September 05, 2016 03:43PM

Hello

I have setup wamp in a LAN. i want to put it online.

Windows 7
wampserver 3.0 64 bit
Apache/2.4.18 (Win64) PHP/5.6.19

Everything is ok local.
I have set a Virtual Host. No problems.
I forwarded the ports on the router, 80 and 3306 for incoming connections.

httpd.conf

# onlineoffline tag - don't remove
Require all granted


httpd-vhosts.com

# onlineoffline tag - don't remove
Require all granted


host file from windows

127.0.0.1 localhost
::1 localhost

127.0.0.1 Test1VH
::1 Test1VH

(Test1VH is my virtual host)


Server is online. All services running.
Still i get this error and cannot access.

Cant see the solution..... For almost a week i am trying this

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: Otomatic (Moderator)
Date: September 05, 2016 04:20PM

Hi,

> httpd-vhosts.com
This file does not exists

># onlineoffline tag - don't remove
This tag does not exist in httpd-vhosts.conf

What is the content of wamp64\bin\apache\apache2.4.18\conf\extra\httpd-vhosts.conf

With Wampserver 3.0.6:
- Wampmanager Tray Icon -> Apache -> httpd-vhosts.conf

You don't need to put the whole server online, just the needed VirtualHost.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: PaulGh (---.rdsnet.ro)
Date: September 05, 2016 04:29PM

hello

typo sorry

httpd-vhosts.conf

#
# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp64/www
<Directory "D:/wamp64/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName Test1VH
DocumentRoot d:/wamp64/www/test1
<Directory "d:/wamp64/www/test1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: Otomatic (Moderator)
Date: September 05, 2016 04:39PM

Hi,

That is correct, it should work from the LAN with 'http://lan_ip_of_server/Test1VH/'

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: PaulGh (---.rdsnet.ro)
Date: September 05, 2016 04:51PM

no LAN. no WAN. same error

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: PaulGh (---.rdsnet.ro)
Date: September 09, 2016 09:44AM

Hello,

Still looking for a solution to this case if anyone can help. Searched alot on the internet and tried everything i found. Same 403 error

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: PaulGh (---.rdsnet.ro)
Date: September 09, 2016 10:15AM

fkin did it. finally after 1 week of frustration. here's what worked for me. in vhosts:

#
# Virtual Hosts
#

<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp64/www
<Directory "D:/wamp64/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName Test1VH
DocumentRoot d:/wamp64/www/test1
<Directory "d:/wamp64/www/test1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


so modify require all granted in the 1st virtual host. thats all. works like a charm. in LAN and WAN. and understandable now...after it works



Edited 1 time(s). Last edit at 09/09/2016 10:21AM by PaulGh.

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: RiggsFolly (Moderator)
Date: September 09, 2016 11:28AM

Hi

Were you trying to make localhost visible on the internet?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: 403 Forbidden error
Posted by: PaulGh (---.rdsnet.ro)
Date: September 09, 2016 11:35AM

hello

my project only. but now i got it how it works. the project is located in the same path as the localhost in another folder only. so in order to get it online i had to put the localhost online too. its the 1st step of access. i got it figured now tho....modifications will come.

Options: ReplyQuote


Sorry, only registered users may post in this forum.