1
votes

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

3

3 Answers

0
votes

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

0
votes

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.

0
votes

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.