Hosting Plans :
















Mission Critical Hosting Services Offerring Reliability & Value

Apache
Questions
  1. What is my default document?
  2. Can I use Server Side Includes with .html files?
  3. How do I password protect a directory?
  4. Can I customize my error messages?


Answers
  1. What is my default document?
    All web servers have something called a default document, this is the document that is served up automatically when you type in a domain name or directory (ie www.domain.com or www.domain.com/directory/). Because there are so many variations on this default document web servers have a series of default documents they look for, and serve them in a pre-defined order. Reliaval's servers look for the following documents in order:
    • index.html
    • index.htm
    • index.cgi
    • index.php
    • index.php3
    • index.php4
    • index.phtml
    • default.htm
    • default.html
    • home.html
    • home.htm
    • index.shtml

    [Back to top]

  2. Can I use Server Side Includes with .html files?
    Reliaval enables Server Side Includes (SSI) by default on all accounts. Ordinarily SSI are called in files that end with the .shtml extension, but you can change that behavior for your server.

    If you would like to set up your site to use Server Side Includes with .html files, you need to create a .htaccess file. To create this file open Notepad, or another text editor and paste the following in to the document:

    Options +Includes
    AddType text/x-server-parsed-html .html

    Save the file as .htaccess and upload it into your root (/public_html) directory.
    [Back to top]

  3. How do I password protect a directory?

    Unix uses .htaccess files to password protect directories. The .htaccess file is a plain text file that is placed in the directory you want to password protect.

    To create a .htaccess file open Notepad, or another text editor, and paste the following code:

    # Access file
    # Replace the pound (hash) sign in the line below with the path for your site
    AuthUserFile /home/username/public_html/#/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Members Site"
    AuthType Basic
    AuthPAM_enabled off


    require valid-user

    The .htpasswd file is the file that will contain all of the usernames and passwords. You'll notice it is placed outside of your root web directory. This adds extra security by preventing unauthorized users from viewing it.

    Next download the Password Protection script from our site and follow the directions for adding usernames and passwords.
    [Back to top]

  4. Can I customize my error messages?

    If you prefer not to have the standard Reliaval error messages displayed when someone gets a "File not Found" error message, you can create custom error messages.

    Create a htaccess file and follow the directions below:

    Custom error messages are configured using the ErrorDocument directive, which is followed by the HTTP response code and a message or URL.

    Messages in this context begin with a single double-quote character ("), which does not form part of the message itself. Apache will sometimes offer additional information regarding the problem/error.

    URLs can begin with a slash (/) for local URLs, or be a full URL which the client can resolve. Examples:

    ErrorDocument 500 http://www.domain.com/error/errorfile.html
    ErrorDocument 404 /home/susername/publci_html/error/errorfile.html
    ErrorDocument 401 /subscription_info.html
    ErrorDocument 403 "Sorry can't allow you access today

    Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as "http" in front of it), Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server. This has several implications, the most important being that the client will not receive the original error status code, but instead will receive a redirect status code. This in turn can confuse web robots and other clients which try to determine if a URL is valid using the status code. In addition, if you use a remote URL in an ErrorDocument 401, the client will not know to prompt the user for a password since it will not receive the 401 status code. Therefore, if you use an "ErrorDocument 401" directive then it must refer to a local document.
    [Back to top]



Home || Order Forms || Domain Registration || Web Site Hosting || E-commerce
Dedicated Servers || Resellers || Support Center || Sitemap

Copyright © 2001 Reliaval.com a division of Interspeed Web Solutions Ltd.
All rights reserved. All other trademarks are the sole property of their respective owners.