Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to run Apache Web Server to host my website. I've everything setup pretty nice...only one small question.
When I ping my website, it shows a test page (/var/www/error/noindex.html). It says its a Apache default test page and that my server is configured correctly. Now I have an index page in /var/www/html called index.html which I want to show by default.
you'll need to edit the file /etc/httpd/httpd.conf (think that's where its located)
search for the section that defines "DocumentRoot" and make it say /var/www/html
NOw, you may also want to look through the file to make sure that index.html is set as your default page name, which means that if you type yoursite.com it will give yoursite.com/index.html. I can't remember what this section is called, but just search the file for instances of "index.html" and see if you can find it.
I think the DocumentRoot will solve your problem though...
Note, the httpd.conf file is distro dependant. I usr Mandrake, and it's actually /etc/httpd/conf/httpd2.conf for me. In Fedora (and redhat, I assume) it's /etc/httpd/httpd.conf
Good luck, let us know if this doesn't solve the prob...
Okay, I found the section you need to look for. There should be something in there that looks like this...
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>
So, either add that, or edit your section (if already present) to include index.html as one of the entries.
Wow!!! Jeffreybluml...you nailed it buddy!!!
I didnt had that directory index thing in my httpd.conf and I added as per your suggestion and VOILA!!! I am done...thanks once again.
One more problem...I just replaced my index.html by another page. As a local host I can see the new page but when i ping my server from another computer it still shows the old page which does not exist. I thought it may be because i havent restarted the server so I did that but it doesnt work. Any tips????
Note: the new page is also index.html so no nomenclature problem that I see.
SOunds to me like the computer from which you're accessing the page just needs it cache refreshed (done by clicking refresh or reload).
If you copied over the old page, and it literally does not exist anymore, then that could be the ONLY reason, the other computer is just showing you the page it has stored in it's memory...
Perhaps you should also adjust the cache settings for that computer to look for a newer version of pages on every visit. Look through the options or preferences in the cache and cookie areas for this setting...
Thanks Jeffreybluml I checked on another browser and it works but not in firefox (on winxp)...I was worried my new page was not visible to others...Thanks once again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.