• Digital accessories
  • Server
  • Digital life
  • Privacy policy
  • Contact us
  1. Home
  2. Article
  3. linux - Apache virtual host doesn't load the application ...

linux - Apache virtual host doesn't load the application ...

Rsdaa 15/11/2021 1753

Stack Exchange Network

Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange0+0Log inSign up

Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.

Sign up to join this community

Anybody can ask a question

The best answers are voted up and rise to the top

Asked5 days ago

Viewed35 times

I wrote httpd.conf file, but it's not loading the index.html file. Whenever I type project URL in browser it says this site can't be reached.

ServerName www.linuxhelptesting.com DocumentRoot /var/www/html/sample1

What am I doing wrong here?

ZygD

2,26244 gold badges2020 silver badges4242 bronze badges

asked Sep 14 at 22:26

muniyamuniya

1322 bronze badges

muniya

is a new contributor to this site. Take care in asking for clarification, commenting, and answering.Check out our

Code of Conduct

.

1

As with your previous question, the problem you seem to be running into is likely DNS related. DNS maps a domain name (e.g. www.example.com) to an IP address (e.g. 1.2.3.4). When any computer wants to go to e.g. www.example.com, there is a process it follows to find the IP of the corresponding webserver. It seems likely that you have not correctly told anyone (even your own computer) how to find the correct IP where Apache is located when asking for e.g. www.linuxhelptesting.com. Note that Apache does not provide this kind of service (DNS). To solve this, you should do one of the following:

Update your computer's hosts file to map the correct local IP to e.g. www.linuxhelptesting.com. Repeat this for any local computers you want to access the site.

Set up a local DNS server (separate from Apache) with proper records to map domain names to IP addresses and ensure that it is the DNS server used by your local router. Then any device connected to your local network should be able to access e.g. www.linuxhelptesting.com without modifying the device's hosts file (assuming you have records mapping e.g. www.linuxhelptesting.com to the correct local IP of the Apache web server).

Set up DNS records that point e.g. www.linuxhelptesting.com to your public IP. This can be done in several ways, but they will involve your domain registrar and either a third-party DNS provider or you setting up a DNS server yourself (somewhat similar to Option 2).

answered Sep 14 at 23:29

AnaksunamanAnaksunaman

13.5k33 gold badges2727 silver badges3434 bronze badges

2

Super User works best with JavaScript enabled

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.


PREV: How To Change The Minecraft Server Version - Apex Hosting

NEXT: Plex media server FAQ ( Frequently Asked Questions)

Popular Articles

Hot Articles
Back to Top