Forum Moderators: phranque

Message Too Old, No Replies

The server VS. the unpublished web site

The saga continues

         

gabby

11:33 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



After repeated attempts to publish my website to an Apache dedicated server with one of the major server and hosting companies -- and numerous calls and trouble tickets to tech support I was told that my website was not showing up due to the following problem with configuration.

Here's a brief summary of what the support guys said:

The appropriate DirectoryIndex entries do not exist within '/etc/httpd/conf/httpd.conf'

To use default.htm as an index file. Without having default.htm set as an index file, it will not automatically load as a web page when www.yoursite.com is requested by a web browser.

You can see that the web page is in the correct folder by visiting [yoursite.com...] You will need to make the appropriate modifications to the httpd.conf file before this page will be loaded.

This is my first time on a dedicated server -- can someone please explain this in simple terms that even I can understand as to how to fix the problem ;)

I am managing the server using 'Simple Control Panel.'

The support guy says they can do it for $75 for the first half-hour -- should I just give in and pay the money?

I'd rather learn how to do it myself so that I can fix it again next time.

jdMorgan

2:00 pm on Sep 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I am managing the server using 'Simple Control Panel.'

control panels are scripts that create configuration directives and insert them into httpd.conf, conf.d, and .htaccess files, as appropriate. They tend to be limited in capabilities, often cause unexpected (and unwelcome) side-effects, and frequently "write very bad code" due to their "one-size-fits-all" approach. They are useful for very basic server management, but also very limited.

If you are on a dedicated server, it's time to dump control panels, dig into the Apache documentation, and learn to configure your server without resorting to control panels.

The directive you need is "DirectoryIndex" in Apache mod_dir [httpd.apache.org]. This directive defines a list of files to be used to serve requests for the index pages of your site -- The server will examine the list, and serve the first file on the list that exists in response for any request for a URL ending with a slash.

Jim

g1smd

11:56 pm on Sep 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is a one line instruction you can paste into the .htaccess file in just a few seconds.

It defines the filenames that can be served as index pages. You just list them on one line.

Ckdv

5:24 pm on Sep 30, 2007 (gmt 0)

10+ Year Member



I believe this should take of Your Problem...

<IfModule dir_module>
DirectoryIndex default.htm index.html
</IfModule>

Placed Directly below Your, ...

<Directory ".../Path to/Your/htdocs/">

Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

</Directory>

Someone Correct Me if this is not!

Ckdv

5:26 pm on Sep 30, 2007 (gmt 0)

10+ Year Member



That would be in the httpd.conf

gabby

12:52 am on Oct 1, 2007 (gmt 0)

10+ Year Member



Thanks for all the info.

I've also discovered that I can change the name of the home page from default.htm to index.html and the site displays correctly.

This seems like the easiest fix -- any harm in doing so?

Ckdv

1:02 am on Oct 1, 2007 (gmt 0)

10+ Year Member



Nope, seems yer

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

was already set the whole time