Virtual Host
Posted by: pakoch (---.ph.ph.cox.net)
Date: January 17, 2018 04:24AM

Hello, I have loaded WAMP onto a system with Win 10 installed. Everything appears to be running OK. The icon is green and all services are running. I have followed the steps to create a virtual host site by coping the path of my folder (on the same computer) into the WAMP virtual host setup screen. However, I am unable to connect. I get a message from Windows saying the "This site can't be reached" ; it refused to connect. I have checked permissions for that folder, reloaded WAMP and stopped and restarted all services, but I still am unable to connect to the local folder. Also, just connecting to local host works OK, it is just when I setup a site in another folder that I have problems. Can anyone give me some recommendations?
Thank You,
Peter Koch

Options: ReplyQuote
Re: Virtual Host
Posted by: Otomatic (Moderator)
Date: January 17, 2018 09:56AM

Hi,

Please READ (and answer) BEFORE YOU ASK A QUESTION

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
PhPMyAdmin 4.8.0.1 - 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
Posted by: RiggsFolly (Moderator)
Date: January 17, 2018 10:54AM

Hi,

Did you add your Virtual Hosts site name to the HOST file?

c:\windows\system32\drivers\etc\hosts

ignore the commented lines you may find in there, a commented line starts with a #


127.0.0.1 localhost
::1 localhost

127.0.0.1 yoursite
::1 yoursite

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

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



Edited 1 time(s). Last edit at 01/17/2018 12:04PM by Otomatic.

Options: ReplyQuote
Re: Virtual Host
Posted by: pakoch (---.ph.ph.cox.net)
Date: January 18, 2018 04:05AM

Hi, Yes, I checked my hosts file and the site name is present. The two un-commented lines are:
127.0.0.1 MySiteName.dev
::1 MySiteName.dev

I am running WAMP 3.1.0, PHP 7.1.9. But I appears to me that the problem must be coming from my Win 10 system, because everything in WAMP is running, green and OK.

If I place a site within the folder that WAMP is located, I can see that. It is only the virtual host function that seems not to work.

Thank You,
PAKoch

Options: ReplyQuote
Re: Virtual Host
Posted by: Otomatic (Moderator)
Date: January 18, 2018 09:25AM

Hi,

With which browser?
Have you tried with other browsers?

Quote

The two un-commented lines are:
127.0.0.1 MySiteName.dev
::1 MySiteName.dev
It's missing:
127.0.0.1 localhost
::1 localhost

Avoid case-sensitive toying. One day you will do it on a file name or PHP variable and you won't understand why it doesn't work.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.3 32 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
Wampserver 3.1.3 64 bit - Apache 2.4.33 - PHP 7.2.6/7.1.18/7.0.30/5.6.36 - MySQL 5.7.22 - MariaDB 10.3.7
PhPMyAdmin 4.8.0.1 - 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


Sorry, only registered users may post in this forum.