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 httpd-vhosts.conf the host is not reachable . After searching the web for a solution, the latest information I got was,

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#

NameVirtualHost *:80

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    DocumentRoot "/srv/http/sami" 
    ServerName dummy.local 
    ErrorLog "/srv/http/sami/dummy-host.example.com-error_log" 
    CustomLog "/srv/http/sami/dummy-host.example.com-access_log" common 
</VirtualHost>

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    DocumentRoot "/srv/http" 
    ServerName localhost 
    ErrorLog "/srv/http/error-log" 
    CustomLog "/srv/http/access-log" common 
</VirtualHost>

But dummy.local fails to load and says,

Unable to access the site
dummy. The local server IP address could not be found.

thanks.

alone

After troubleshooting some basic steps, I solved the problem by adding the virtual host 's ServerName as /etc/hosts .

127.0.0.1 dummy.local

That solved it for me. Hope this helps others too. Have a nice day.

Related


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 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 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

Apache HTTPD virtual host, what is the %1+ in the document root?

jampak So I set up a virtual host and made it my document root VirtualDocumentRoot "/sites/%1+/www" All is well, but this one thing has killed me. Does anyone know what %1+ means? Can someone explain exactly what it is and how it works. I understand where it

Linux - Unable to hide Apache version of virtual host

master I actually set up a virtual host with apache2, but my virtual host got hard. The apache version and server OS will be displayed in the header. When I use the master server link, the version is hidden. please help. thanks. Stewart You can hide the server

Linux - Unable to hide Apache version of virtual host

master I actually set up a virtual host with apache2, but my virtual host got hard. The apache version and server OS will be displayed in the header. When I use the master server link, the version is hidden. please help. thanks. Stewart You can hide the server