1

I have a specefic problem, i have more websites on my localhost server (xammp), they has a virtul host, but i want to access this websites trough lan or wlan because so i can test it on mobile devices. If i call only ip on other device then i see xammp control panel, but i don't know how can i call websites in lan like: "site1.local, site2.local, site3.local", are here static ip's needed? On the router is DHCP enabled. I read few topics and this is all clear for me, the problem is only access on this sites trough network.

Read topics: How to set up Apache virtual host such as http://home/, http://office/, etc Accessing localhost (xampp) from another computer over LAN network - how to? How to set up Apache virtual host such as http://home/, http://office/, etc Apache: see named virtual hosts from LAN

Community
  • 1
  • 1
m_73
  • 569
  • 2
  • 5
  • 14

3 Answers3

0

I do this on work for testing. We have a XAMPP localhost server. My projects are in the htdocs folder. like this: c:\xampp\htdocs\niceproject The IP for reqesting xampp is something like this: 192.168.10.104.

Now for calling the Websites just do this: 192.168.10.104/niceproject

I hope this is what you are looking for.

DaTebe
  • 702
  • 1
  • 9
  • 30
0

Find your IP of your server machine. If it uses windows, press start then type into the search bar cmd. Then when a command promt comes up type in ipconfig and hit enter. Look for "IPv4-address" and to the right of that is your local IP of your computer.

Then you can use a computer on your wireless LAN or a wired connection. Simply type in the IP of your computers local IP with XAMP, and you are good to go!

Hope this helped
-Kad

Kad
  • 388
  • 3
  • 15
  • Keep in mind when you use DHCP your local IP of your server will change eventually. Then you will have to find the IP again, unless you make it a static one. – Kad Mar 24 '14 at 13:41
0

To access multiple sites (virtual hosts) served from one machine (say lanwww running apache) on mobile devices the usage of ServerName (say site1, ServerAlias site1.lanwww) fails - the DHCP on the router won't map subhosts (site1.lanwww). I found that using different ports for the subsites works nicely though - remember to add appropriate Listen statements to the ports.conf. The configuration of other webservers is left as an exercise to the reader.

flowtron
  • 854
  • 7
  • 20