virtual host failed in wamp server 3
Posted by: nadee (123.231.121.---)
Date: April 13, 2018 03:12PM

1. I uncommented the "Include conf/extra/httpd-vhosts.conf line in httpd.conf file

2. add the necessary code to httpd-vhosts.conf file..like this.

(my normal localhost is localhost:8080)

<VirtualHost *:8080>
Servername myproject.com
DocumentRoot c:/wamp64/www/myproject
<Directory "c:/wamp64/www/myproject'>
Options +Indexex + Includes + FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directroy>
<VirtualHost>

3. then I changed the host file windows.(using administrative privileges)
127.0.0.1 myproject.com

4. after restarting the wamp server I went to chrome and typed myproject.com
but browser says Not Found (HTTP Error 404. The requested resource is not found)

please help me to solve my problem



Edited 2 time(s). Last edit at 04/13/2018 03:16PM by nadee.

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: Otomatic (Moderator)
Date: April 13, 2018 03:23PM

Hi,

Why go to modify files "by hand" when everything is done by itself using the appropriate tools ?

Wampserver 3 - Create or add a VirtualHost

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

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: nadee (123.231.121.---)
Date: April 13, 2018 03:31PM

thank you! @ Otomatic (Moderator)

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: Otomatic (Moderator)
Date: April 13, 2018 04:57PM

Hi,

> <VirtualHost *:8080>
Why port 8080 ?

What is the result of :
Right-Click Wampmanager tray icon -> Tools -> Test port 80

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

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: nadee (123.231.121.---)
Date: April 13, 2018 05:27PM

I can't use port 80 because some other application used the port 80.
so that's why wamp server choose port 8080.

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: Otomatic (Moderator)
Date: April 13, 2018 06:50PM

Hi,

> I can't use port 80 because some other application used the port 80.
That's why I asked you to give the result s an integrated test as tools in wampserver.

Port 80 is reserved for the http protocol and it is not up to Apache to change port if an application uses this port. It is up to the application to change port or not to be used.
Depending on the test results, we can tell you what to do so that port 80 is assigned to Apache, which must always be the case.

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

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: nadee (123.231.121.---)
Date: April 13, 2018 07:00PM

this is the test result


***** Test which uses port 80 *****

===== Tested by command netstat filtered on port 80 =====


Test for TCP
Your port 80 is used by a processus with PID = 4
The processus of PID 4 is 'System' Session: Services
The service of PID 4 for 'System' is 'N/A'
*** ERROR *** This service IS NOT from Wampserver - Should be: 'wampapache64'

Test for TCPv6
Your port 80 is used by a processus with PID = 4
The processus of PID 4 is 'System' Session: Services
The service of PID 4 for 'System' is 'N/A'
*** ERROR *** This service IS NOT from Wampserver - Should be: 'wampapache64'

===== Tested by attempting to open a socket on port 80 =====

Your port 80 is actually used by :

Server: Microsoft-HTTPAPI/2.0

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: Otomatic (Moderator)
Date: April 13, 2018 09:13PM

Hi,

Apply item 08 of TROUBLESHOOTING TIPS

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

Options: ReplyQuote
Re: virtual host failed in wamp server 3
Posted by: nadee (123.231.105.---)
Date: April 14, 2018 10:30AM

thanks it worked!
you're the best.

Options: ReplyQuote


Sorry, only registered users may post in this forum.