0

I've got WAMP 3.2 working fine locally, I can access my site using localhost or another virtualhost name I've created, however when trying to access remotely I get "This site can't be reached" error unless I use the server IP address (i.e. "192.168.0.81/Euro") and then it's fine.

I see this is a question that's asked quite a bit, and I've done everything suggested but still no luck.

This is what my httpd-vhosts.conf file looks like:

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require all granted
    Allow from all  
  </Directory>
</VirtualHost>


#
<VirtualHost *:80>
    ServerName euroscore.local
    DocumentRoot "c:/wamp64/www/euro"
    <Directory  "c:/wamp64/www/euro/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
        Allow from all
    </Directory>
</VirtualHost>

Any suggestiosn to get this working is appreciated. I really need to have remote access from devices using one of the virtual hosts names instead of the IP address of the server hosting WAMP.

I'm also concious that I should change this to Allow from local but I didn't want to limit my chances of success while fault finding. I'm restarting all services between changes.

Dan

Dan Twining
  • 640
  • 4
  • 17
  • 30
  • Where are you trying to access the `euroscore.local` site from? A device on your local(home) network, or from anywhere out on the internet – RiggsFolly May 06 '23 at 13:52
  • First, you are mixing Apache 2.2 and Apache 2.4 syntax. `Require all granted` says allow access to this VH from anywhere in the universe in Apache 2.4. `Allow from all` says the same but in Apache 2.2. SO you can delete the `Allow from all` – RiggsFolly May 06 '23 at 13:54
  • You never want to allow access to localhost from anywhere but the machine running WAMPServer. Its not a secure thing to do – RiggsFolly May 06 '23 at 13:55
  • You shoudl consider upgrading WAMPServer to V3,3. Use the [Backup repo](https://wampserver.aviatechno.net/?lang=en) Its easier to navigate than sourceforge and gets updated quicker. use the `Wampserver update 3.3.1` link in the UPDATES section. It wont effect anything but the WAMPServer code itself. – RiggsFolly May 06 '23 at 13:56
  • You also have a number of other issues to get past. Nowhere except the PC running WAMPServer knows about the domain name `euroscore.local` So if its another PC you can edit the HOSTS file on that PC to include `192.168.0.1 euroscore.local` assuming your wampserver pc is on ip address 192.168.0.1 – RiggsFolly May 06 '23 at 14:00
  • If you are using another devide like a tablet or phone, you cannot do that without rooting the devide, not recommended. So you will have to do something like this https://stackoverflow.com/questions/24005828/how-to-enable-local-network-users-to-access-my-wamp-sites/24011132#24011132 – RiggsFolly May 06 '23 at 14:02
  • Thanks for the reply. I am trying to use phones as remote devices. I updated WAMPServer to V3.3 and tried following the instructions on the last link you shared but it still doesn't work. I've removed Allow from all as suggested. I can accesss the server using the IP address of the server running WAMP, just not the localhost name. – Dan Twining May 06 '23 at 14:39
  • localhost is a special loopback domain, it can only ever mean ___This PC___ so you can ever use locahost to get to another pc on the network. – RiggsFolly May 08 '23 at 08:56
  • 1
    You cannot use a domain name on a phone that does not exist in the DNS server that the phone uses[unless you root your phone(s)] as you cannot create a line in the HOSTS file on the phone. Yours wont be as its a domain you have invented but not registered. – RiggsFolly May 08 '23 at 08:58
  • Remember domain names `euroscore.local` are converted to an ip address by the DNS system. These domain names only really exist in the DNS servers with a corss reference to an actual IP Address – RiggsFolly May 08 '23 at 09:00

0 Answers0