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

Hi,


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.0.0.0:82
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
</Directory>
</VirtualHost>

<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
</Directory>
</VirtualHost>


------------etc/hosts-----------

127.0.0.1 localhost
127.0.0.1 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.

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

Hi

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 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-

Sorry, only registered users may post in this forum.