Can't access Xampp site through LAN [SOLVED]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't access Xampp site through LAN [SOLVED]

Postby Ikonn » 23. January 2011 03:44

Hi, I can't access XAMPP via LAN... here's what I need:

MACHINE 1 (server): Running XAMPP. When I enter local.mysite.com, it works perfectly, showing the site!

MACHINE 2 (laptop): When I enter local.mysite.com... it shows me the page "XAMPP for Windows" and I want to display the site and not the XAMPP Page

My configuration so far:

MACHINE 1 (server):

http-vhosts.config
Code: Select all
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
  DocumentRoot D:/Webserver/
  ServerName localhost
</VirtualHost>

<VirtualHost local.mysite.com>
  DocumentRoot "D:/Webserver/drupal"
  ServerName local.mysite.com

  CustomLog "D:/Webserver/mysite.com/logs/local.mysite.com.access.log" combined
  ErrorLog "D:/Webserver/mysite.com/logs/local.mysite.com.error.log"

  <Directory "D:/Webserver/drupal">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>


Windows hosts file:
Code: Select all
127.0.0.1       localhost
::1             localhost
127.0.0.1      local.mysite.com



MACHINE 2 laptop:
Windows hosts file:
Code: Select all
192.168.1.23      local.mysite.com



I've been trying for hours. I must be missing something. Can someone help?

Thank you very much!
Ikonn
 
Posts: 27
Joined: 23. January 2011 03:30
Operating System: GNU/Linux Debian

Re: Can't access Xampp site through LAN

Postby Sharley » 23. January 2011 07:03

Try removing the 127.0.0.1 from the equation as that is the local loop back address only
Code: Select all
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
Change to have Apache use a wild card address like so
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
  DocumentRoot "D:/Webserver"
  ServerName localhost
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "D:/Webserver/drupal"
  ServerName local.mysite.com
  <Directory "D:/Webserver/drupal">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
  CustomLog "D:/Webserver/mysite.com/logs/local.mysite.com.access.log" combined
  ErrorLog "D:/Webserver/mysite.com/logs/local.mysite.com.error.log"
</VirtualHost>


Good luck and best wishes.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Can't access Xampp site through LAN

Postby Ikonn » 23. January 2011 12:54

Thanks Sharley, that did it!

I messed around with so many apache settings, I was getting a bit mad about it!!!

Once again, thank you... you saved my day!
Ikonn
 
Posts: 27
Joined: 23. January 2011 03:30
Operating System: GNU/Linux Debian


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 144 guests