How to access local site from other computer on windows PC

Posted on

How to access local site from other computer on windows PC – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, apache-2.2, , , .

On my linux pc i access webisite by going http://site1.local

I have setup virtual host in httpd.conf

I want that when i should be able to access that address from windows PC.

In the windows hosts file i have written

192.168.1.81 site1.local

But still i can’t access the page.

i can ping that adress but not get the webpage to work

Solution :

You can change your virtual host from 127.0.0.1 to your network ip which is 192.168.1.81:80 or you can make it *:80.

I would recommend the 2nd option so it will keep working on both, internaly on the server and within your internal ip.

The reason it won’t work for your other computer is probably because it is bounded to 127.0.0.1.

So it would be:

NameVirtualHost *:80

<VirtualHost *:80>

The NameVirtualHost *:80 is needed so it won’t let other sites conflict with each other, but make sure you have only one entry of NameVirtualHost in your httpd.conf or vhosts.conf.

It should be a matter of checking if apache is listening on port 80 with

sudo netstat -anp | grep :80

for which you should see your apache and IP:PORT that it is listening on.

If it listens on the right interface (or on all interfaces) then it can be a problem of the right firewall or name resolution on the other local station.

HOSTS file might be or not be fine, test if it works over http://192.168.1.81

Leave a Reply

Your email address will not be published. Required fields are marked *