Unable to access Apache virtual host from other computer on local network


Ashwin Kumar

I can't connect to mysite.comit from another computer in the network . Several related configuration files are shown below.

mine apache2.config:

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

NameVirtualHost *:80
ServerName 157.50.13.131
Include /etc/apache2/sites-available/*.conf

mine /etc/hosts:

127.0.0.1   localhost
127.0.1.1   ashwin-HP-Notebook
127.0.0.1   mysite.com

The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

My virtual host configuration file ( /etc/apache2/sites-available/mysite.conf):

<VirtualHost *:80>
 ServerAdmin webmaster@localhost
 ServerName mysite.com

 DocumentRoot /home/ashwin/mysite
 <Directory /home/ashwin/mysite/>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
 </Directory>

 ErrorLog /var/log/apache2/mysite/error.log
 LogLevel warn

 CustomLog /var/log/apache2/mysite/access.log combined

</VirtualHost>

When I try 192.168.0.100/mysite.com from a system in my lan, the requested URL /mysite.com is not found on this server

Why doesn't this work?

north yard

You need to update the hosts file on the client computer, the web server's hosts file cannot be used as a DNS resolver for other systems on the network

# /etc/hosts

192.168.0.100    mysite.com

After adding this to the client's hosts file, you should be able to access mysite.com from the browser on the client

Related


Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Unable to access Apache virtual host from local network

username I have setup a virtual host with Apache2 using the following configuration: <VirtualHost *:8080> ServerName example.com DocumentRoot /var/www/example.com </VirtualHost> The website can be accessed from outside. example.com However, if I ente

Unable to access apache2 virtual host from another computer

Kaikoura I'm running an apache2 webserver from my computer and when I access the site from my computer it works fine, but when I try to access it from another machine (running windows) the browser outputs, The site cannot be reached. Here is my site configurat

Unable to access web server from local virtual network

Akalenuk I have installed several virtual machines. Some uder Windows, some under Fedora Linux. On one of the Fedora machines, I have the Apache web server installed. 172.16.27.129:80I set the server name in httpd.conf to , make sure access to the html directo

Unable to access web server from local virtual network

Akalenuk I have installed several virtual machines. Some uder Windows, some under Fedora Linux. On one of the Fedora machines, I have the Apache web server installed. 172.16.27.129:80I set the server name in httpd.conf to , make sure access to the html directo

Unable to access Apache httpd virtual host

alone I am new to linux and I can install my LAMP server on Manjaro. Got it all, but now I'm having issues setting up the virtual host. I used httpd and commented out "include conf/extra/httpd-vhosts.conf" in /etc/httpd/conf/httpd.conf . But after editing http

Unable to access Apache httpd virtual host

alone I am new to linux and I can install my LAMP server on Manjaro. Got it all, but now I'm having issues setting up the virtual host. I used httpd and commented out "include conf/extra/httpd-vhosts.conf" in /etc/httpd/conf/httpd.conf . But after editing http

Unable to access Apache httpd virtual host

alone I am new to linux and I can install my LAMP server on Manjaro. Got it all, but now I'm having issues setting up the virtual host. I used httpd and commented out "include conf/extra/httpd-vhosts.conf" in /etc/httpd/conf/httpd.conf . But after editing http

Unable to access Apache httpd virtual host

alone I am new to linux and I can install my LAMP server on Manjaro. Got it all, but now I'm having issues setting up the virtual host. I used httpd and commented out "include conf/extra/httpd-vhosts.conf" in /etc/httpd/conf/httpd.conf . But after editing http

Unable to access Apache httpd virtual host

alone I am new to linux and I can install my LAMP server on Manjaro. Got it all, but now I'm having issues setting up the virtual host. I used httpd and commented out "include conf/extra/httpd-vhosts.conf" in /etc/httpd/conf/httpd.conf . But after editing http