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 upSuper 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 communityAnybody 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/sample1What am I doing wrong here?
ZygD2,26244 gold badges2020 silver badges4242 bronze badges
asked Sep 14 at 22:26
muniyamuniya1322 bronze badges
muniyais a new contributor to this site. Take care in asking for clarification, commenting, and answering.Check out our
Code of Conduct.
1As 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
AnaksunamanAnaksunaman13.5k33 gold badges2727 silver badges3434 bronze badges
2Super 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