Hello,

I have set up a website on my Ubuntu desktop using Apache, but i can't access it from another machine via IP address. Which configurations should I add to access it via IP eg: 192.168.108.12 instead of localhost.

Thanks.

Re: How to access my apache website via IP address? 80 80

you have to tell apache what the default web site is for the server put something like this in the httpd.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
Re: How to access my apache website via IP address? 80 80

If your both machines are communicating with each other then other machine can access your server with IP based on the VHOST configuration you have setup (default VHOST will be called by default).


Thanks,
Manoj Samtani
http://apache-compression.blogspot.com/

Re: How to access my apache website via IP address? 80 80

Correct, the virtual host either has to be the first (default) entry for the named based Vhost, are it needs to be setup as an IP based vhost.

Re: How to access my apache website via IP address? 80 80

:) For more info please refer this link not any more


---
Manoj Samtani

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.