LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to access local web server? (https://www.linuxquestions.org/questions/linux-server-73/how-to-access-local-web-server-635440/)

Libertes 04-15-2008 05:44 AM

How to access local web server?
 
Hi,
Fine things :

-my computer is 192.168.1.10

-I have a Centos Apache+MySql+Webmin+VirtualminGPL at a local computer 192.168.1.20
(connects to internet, virtualdomainnames work,every virtualname(domainname) is reachable from internet)

-router modem is 192.168.1.1
(connects to internet, connects to ssh,webmin at 192.168.1.20)


Bad things :

- I cannot open http://localhost at 192.168.1.20 !?

- I can open Webmin http://localhost:10000 at 192.168.1.20

- When i am at my computer (192.168.1.10) when i write (192.168.1.20) default page of root Virtual server page opens.

How can i reach one/any of the Virtual domain names via firefox at local network(at 192.168.1.10)?

I always log to webserver(192.168.1.20) from internet. To make things faster and safer i wanna log in to webserver from my computer (192.168.1.10)

brianmcgee 04-15-2008 06:52 AM

I think that you have configured your Apache vhost name-based. That means, that your Apache listens to the name you gave your vhost. To access this vhost you may add the name of your vhost in /etc/hosts together with the associated ip address:

Code:

127.0.0.1      your-webserver.com
Code:

# links http://your-webserver.com

Libertes 04-15-2008 07:11 AM

yes it is a name-based.

here is my new /etc/hosts file
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost localhost.mydomainname.com mydomainname.com
::1 localhost6.localdomain6 localhost6
192.168.1.20 localhost.localdomain localhost localhost.mydomainname.com

But this did not changed anything!?


All times are GMT -5. The time now is 01:12 AM.