Web Page
Q1. Can I customize my own error pages?
Q2. Can I password protect a directory?
Q3. Do you support server-side includes (SSI) and how do I use it?
Q1. Can I customize my own error pages? Yes. Here's how:
You need to specify the location and filenames of the error
documents. The error document configuration is stored
/var/www/html/.htaccess. To customize your site's error
messages, add the following lines to the .htaccess file (create
if it does not exist):
ErrorDocument 401 /401_auth_required.html
ErrorDocument 403 /403_forbidden.html
ErrorDocument 404 /404_file_not_found.html
ErrorDocument 500 /500_server_error.html
You may of course change the file names and paths as desired. For example,
ErrorDocument 403 /error_doc_directory/forbidden.php
Put the desired contents in each of the above files you create.
[BACK]
Q2. Can I password protect a directory? Yes. Password protection is done via Apache's .htaccess mechanism. The procedure is different depending on whether or not you use FrontPage.
FrontPage Users:
- Create a folder in which to store your private files. Put your private files inside this folder.
- Convert this folder into a subweb. You may do this by right clicking once on the folder and selecting "Covert to Web" from the popup menu.
- If you are working directly on your website (as opposed to working on a local copy on your hard disk), proceed to step 4.
If you are working on a local copy of your website on your hard disk, publish your web to the server now (File->Publish Web).
- Close your local web site (File->Close Web).
- Open your web directly from the server (File->Open Web. In the folder name box, enter "http://www.yourdomain.com", where yourdomain.com is the name of your website).
- Double click on the private folder subweb you created in step 2. Go to Tools->Security->Permissions. A permissions window will appear.
- Inside the permissions window, chose "Use unique permissions for this web" and press the Apply button (if you pressed the OK button by accident, repeat step 4).
- Click on the Users tab. At the bottom of the window, select "Only registered users have browse access" and press the Apply button (if you pressed the OK button by accident, repeat step 4).
- Click on the Add button to add a new user. Select a username and password that will be required to access your private information. Press the OK button to save your changes.
- Click on the OK button on the permissions window to close it.
- Close your web (File->Close Web). Your private folder should now
be password protected.
Everyone Else:
- Create a directory in which to store your private files.
- Log into your admin control panel at www.(YOUR-SITE).com/admin
- Click on "Configuration" (under "Web Server" on the left menu)
- Click on "Protected Directories" toward the top middle.
- Click on "manage groups" to create a group (pick an group name of
your choice).
- Click on "manage user" to create one or more users and assign these
users to the group you created.
- Click on the red lock for the directory you want to password
protect, and select the group you created above for which you want to
allow access.
[BACK]
Q3. Do you support server-side includes (SSI) and how do I use it? Yes, we support SSI on any hosting package that includes CGI support. One of the most common uses of server-side includes is to include the results of a CGI program, such as a hit counter. To include the output of a CGI script or the contents of another HTML file, add code similar to the following to your HTML file:
<!--#include virtual="/cgi-bin/counter.pl" -->
In addition, your HTML file must end in .shtml instead of .html, or the permissions on the file must be marked as executable. [BACK]
|