Wamp Virtual Host Error 502
Posted by: sombir_aricent (165.225.104.---)
Date: August 11, 2017 07:33AM


I am facing an issue when accessing when accessing wampserver 3.0.6 64bit virtual host.

Same is working when I connected on WiFi, but not working on LAN.

Getting 502 bad Gateway Error (DNS Error)

Following are my configurations :

--------- httpd.conf ------------

Listen [::0]:82

ServerName localhost:82

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

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

<VirtualHost *:82>
ServerName localhost
ServerAlias localhost
DocumentRoot "D:/wamp/www"
<Directory "D:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all
Require all granted

<VirtualHost *:82>
ServerName mysite.local
DocumentRoot "D:/wamp/www/test"
<Directory "D:/wamp/www/test/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all
Require all granted

------------etc/hosts----------- localhost mysite.local

::1 localhost
::1 mysite.local

After all these changes i have restarted all wamp servies, but no luck.

[localhost] this URL is working fine but the below virtual host is not working

[mysite.local] Getting error 502 bad gateway, i also tried to access url like [mysite.local] but no luck again.

DNS error

DNS error (the host name of the page you are looking for does not exist)

Please check that the host name has been spelled correctly.

Any help will be appreciated.

Thanks in Advance.

Options: ReplyQuote
Re: Wamp Virtual Host Error 502
Posted by: RiggsFolly (Moderator)
Date: August 11, 2017 09:18PM


Start by removing this line

Allow from all

That is old Apache 2.2 syntax and does not mix well with the equivalent Apache 2.4 syntax which is
Require all granted

Also dont make localhost `Require all granted`, leave that as `Require local`

(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.6.5.2> <MySQL Workbench>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote

Sorry, only registered users may post in this forum.