logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in  RSS Apache Lounge  


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.



Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: virtualhost access
Author
CompleteNewb



Joined: 11 Dec 2020
Posts: 3
Location: Canada, Montreal

PostPosted: Tue 22 Dec '20 0:07    Post subject: virtualhost access Reply with quote

Hello
I have set up apache2 on linux ubuntu. The first website I set up I could access it from every computer in my house. Then I configured virtualhost with multiple website and I have been accessing them, including a php form, from my computer browser using the domain name without any problem, but now i can't access them from another computer in my house. I don't understand.
What is the configuration that permits another computer to access a virtualhost website from another computer on the same router?

Please keep in mind that I am a complete Newb

Thank you for your time
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6890
Location: Germany, Next to Hamburg

PostPosted: Tue 29 Dec '20 0:02    Post subject: Reply with quote

Do you access the second host by domain name?
Back to top
CompleteNewb



Joined: 11 Dec 2020
Posts: 3
Location: Canada, Montreal

PostPosted: Wed 30 Dec '20 20:48    Post subject: Reply with quote

I don't understand.

I have set up my virtualhost with two different site.

"www.jackmcmack.com" and "www.testmyphp.com"

I have no problem accessing them in my browser by writing those name in the address bar, but if I do it from another computer in my house it doesn't work.

When I only had one website(www.jackmcmack.com) I could access it from any computer in my house by writing www.jackmcmack.com in the address bar of their browser. And if I remember correctly, I could even access it using the ip address 197.168.1.11
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6890
Location: Germany, Next to Hamburg

PostPosted: Tue 05 Jan '21 16:19    Post subject: Reply with quote

I see. How do you handle the DNS? Via the hosts file? if yes, did you update the DNS name in hosts file on all computers?
Back to top
CompleteNewb



Joined: 11 Dec 2020
Posts: 3
Location: Canada, Montreal

PostPosted: Tue 05 Jan '21 23:58    Post subject: Reply with quote

Hum, I have a hosts file in /etc directory where i have written:

127.0.0.1 localhost
127.0.1.1 littleboy //the name of my computer
127.0.0.1 app.localhost
127.0.0.1 www.jackcmack.com
127.0.0.1 www.testmyphp.com

last time when i had only one site that was what i did.
Do I have to make something different with multiple site?
I never updated the hosts file on my other computer or devices when I had only one website enabled
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6890
Location: Germany, Next to Hamburg

PostPosted: Wed 06 Jan '21 9:39    Post subject: Reply with quote

On the other computers you have to add those entries, too, but with the internal IP address.

e.g.

Code:

# ...
192.168.0.27 www.jackcmack.com
192.168.0.27 www.testmyphp.com
Back to top


Reply to topic   Topic: virtualhost access View previous topic :: View next topic
Post new topic   Forum Index -> Apache