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

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
Wampserver 3.1.3 64 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
PhPMyadmin 4.8.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
Wampserver 3.1.3 64 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
PhPMyadmin 4.8.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
Wampserver 3.1.3 64 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
PhPMyadmin 4.8.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
Wampserver 3.1.3 64 bit - Apache 2.4.34 - PHP 7.2.8/7.1.20/7.0.31/5.6.37 - MySQL 5.7.23 - MariaDB 10.3.8
PhPMyadmin 4.8.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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.