Hi,
First of all please upgrade to the latest WAMPServerYou can download the update
From the backup repo it is easier to navigate then SourceForge and then download and install the V3.0.9 update or whatever the latest version of WAMPServer at the time you read this.
This will only amend WAMPServers own code and NOT the versions of Apache/MySQL/PHP/etc that you are using.
This is the method I use to allow access to a Virtual Host from a Phone/Tablet and WHY!The normal way to run a Virtual Hosts defined site is to setup a VH and then place the domain name into the HOSTS file on our WAMPServer PC.
This seeds the DNS Cache with the knowledge that `example.com` lives on a PC with the ip address `127.0.0.1` or `::1` i.e. Our local PC.
This just stops the browser going out to a DNS Server and looking for our VH's domain name i.e. `example.com` and of course failing to find it.
Now on a Phone/Tablet we cannot access the HOSTS file, and therefore cannot tell the phones browser that `example.com` lives on ip address `192.168.1.10` (
EXAMPLE ONLY our WAMPServer PC's ip address )
Because the phone's browser will attempt to find the domain name used in the browser address bar with a DNS Server, we need another way of forcing the Phone's Browser to go to the correct ip address to find our Virtual Hosts defined site.
We can do this by entering the IP Address of the PC running WAMPServer instead of our Virtual Hosts domain name. This gets around the first problem.
Now we need to define our Virtual Host a little differently so that it is the site that gets picked up by Apache as the correct site. We do this by adding a specific port number to each Virtually Hosted site we want to access from a Phone/Tablet.
So :
1. Add another Listening port to WAMPServer (Apache) using the WAMPServer menus.
- right-click on wampmanager -> Tools -> Add a Listen port to Apache
- - In the dialog box enter the port number you want to use EG 8000
- - Please dont use the same port number more than once
2. Edit the httpd-vhosts.conf file, using the wampmanager menus
- left-click wampmanager -> Apache -> httpd-vhosts.conf
- - Add the new Virtual Host Definition AFTER the existing `localhost` [Never remove the localhost definition]
## Access Site from the WAMPServer PC
<VirtualHost *:80>
ServerName example.dev
DocumentRoot "c:/wamp64/www/example/www"
<Directory "c:/wamp64/www/example/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
## Access Site from Phone/Tablet
<VirtualHost *:8000>
ServerName example.phone
DocumentRoot "c:/wamp64/www/example/www"
<Directory "c:/wamp64/www/example/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require ip 192.168.1
</Directory>
</VirtualHost>
- - Note I have used that same port number i.e. 8000 as I used in step 1, if you picked a different port also use that different port on the `<VirtualHost *:8000>` line
---------------------------------------------------------------------------------------------
(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 --
phpMyAdminGet 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-