-1

I'm having trouble setting up some virtual hosts using XAMPP. The machine name is server02.bb.net and is only accessible on the Intranet. I want other machines on the network to be able to see the virtual hosts I want to created.

I need dev.server02.bb.net and live.server02.bb.net

dev should point to - C:\xampp\htdocs\dev and live should point to C:\xampp\htdocs\live

The server is running on port 8080. When the user visits server02.bb.net from their browser, I'd like them to be pointed to the 'live' folder.

Hope someone can help!

Thanks

Edit:

My current vhosts.conf;

NameVirtualHost *:8080

<VirtualHost *:8080>
  DocumentRoot C:\xampp\htdocs\live
  ServerName localhost
</VirtualHost>

<VirtualHost *:8080>
  DocumentRoot C:\xampp\htdocs\dev
  ServerName dev.server02.bb.net
 <Directory "C:\xampp\htdocs\dev">
   Options Indexes FollowSymLinks
   AllowOverride All
   Order allow,deny
   Allow from all
 </Directory>
</VirtualHost>

Hosts.conf;

 127.0.0.1       localhost
 127.0.0.1    dev.localhost
 127.0.0.1    dev.server02.bb.net
 127.0.0.1    server02.bb.net
4
  • So what exactly doesn't work?
    – Mxx
    Feb 25, 2014 at 13:50
  • I can't access dev.server02.bb.net from an outside machine. I can only access dev.server02.bb.net from the localhost.
    – Jake Evans
    Feb 25, 2014 at 13:52
  • Is dev.server02.bb.net resolvable on other computers?
    – Mxx
    Feb 25, 2014 at 13:56
  • I should of mentioned that it is dev.server02.bb.net:8080. But no, that isn't accessible from any other machines. server02.bb.net:8080 is, however.
    – Jake Evans
    Feb 25, 2014 at 13:58

1 Answer 1

1

Based on what you provided in your question it sounds like dev.server02.bb.net and live.server02.bb.net do not exist in dns or have incorrect information there.

If you have access to these dns records you should update them to contain correct information.

If not, you should update your computers' local hosts files and hardcode those hostnames to IP address of your server.

2
  • I have dev.server02.bb.net in hosts;
    – Jake Evans
    Feb 25, 2014 at 14:17
  • @TomSothcott do you have it in hosts file on computers from which you try to access it? Having that only on the server is not sufficient.
    – Mxx
    Feb 25, 2014 at 19:07

Not the answer you're looking for? Browse other questions tagged .