Authoring/Development - Configuring Web Settings
The Account Control Center makes it easy for you to take advantage of the flexibility of the Apache Web server to customize and secure many aspects of your Web site. All the features described here may also be edited manually using an .htaccess file.
- Log into the Account Control Center
- Click File Management
- Click Web (under the "Jump to a directory:" heading)
- If you will be working in a subdirectory, click on the folders next to the directory names until you have reached that directory
- Click Web Settings (to the right of the "Special Commands" heading)
- Select one of the options
By default, when no file is specified in a Web site address, Apache will first look for an index.html file, followed by other variations such as index.shtml. Through this interface, you can override this behavior and choose which files Apache should search for and in what order.
When you click "Index Page" in the Web Settings menu, you will see a text box. This lists the files that Apache recognizes. The highest priority is given to the filename at the far left, and it searches them from left to right. You can add new file names by typing them here.
The Account Control Center (ACC) supports two methods of controlling access to a directory: based on the IP address of the requesting client and via username/password combinations.
IP-Based Access Control
Click "Access Controls" and you'll see two text boxes. In the first box, you can list whole and partial IP addresses which will be denied access to the directory. In the second box, you can list addresses that should be allowed access. In either box, the keyword all can be used to allow or deny access from *all* domain names.
If you wish to list partial IP addresses to either allow or deny access to certain IP address blocks, simply enter in the portion you wish to block or allow. For example, if you wish to block all of 123.45.678.XXX, you would just enter "123.45.678" into the Denied IPs text box. If you wanted to block 123.45.XXX.XXX, you would enter "123.45" in the Denied IPs text box.
You might also want to allow access to only your static IP address while developing a site. To accomplish this, type your IP address into the first text box (Allowed IPs) and type all into the second text box (Denied IPs).
Password-Based Access Control
When you enter this menu for the first time, you'll see that password protection is disabled, and an Enable Password Protection button at the bottom of the menu. Click the button to enable this option.
Once you've done that, the directory is password protected. A form will be presented for you to add username/password combinations -- be sure to create at least one for yourself, or no one will be able to enter the directory!
If you'd rather password-protect your directories manually using .htaccess, you can learn how in our tutorial.
Apache allows you to specify a custom page to be displayed for each type of error. When you click "Error Pages" from the Web Settings page, you can specify pages to display for these errors:
404 "File Not Found" Error - displayed if a requested page doesn't existYou must place your custom-error pages in the appropriate subdirectory of your Web directory (/usr/www/users/username). When you are in the Account Control Center (ACC) on the Error Pages page, you must enter the path to your custom error pages in the text box fields.
500 "Internal Server" Error - displayed if a CGI script fails to execute
403 "Forbidden" Error - displayed if a requested page is forbidden from being viewed (for instance, if the file is not world-readable)
401 "Not Authorized" Error - displayed if an incorrect password is given for a password-protected directory or if the client's IP address is forbidden by Access Control rules
For example, if only have one domain on your account, and you created a directory in your Web directory called "errors," you should enter a "relative" path that looks like:
/errors/404.htmlPlease note that you should replace "404.html" with the name of your custom error message file.
While we keep our installed MIME types, or Multipurpose Internet Mail Extensions, as current as possible, there may be times when you need a new or custom MIME Type working quickly on your account.
To add a new or custom MIME type, please follow these instructions:
- Log into the Account Control Center (https://my.pair.com)
- Click File Management
- Click Web (under "Jump to a directory" heading)
- Click Web Settings (to the right of the "Special commands:" heading)
- Click MIME Types
- Enter MIME type in MIME Type field (e.g. application/x-httpd-php3)
- Enter Extension(s) in the Extension(s) field
- Click Add Type
When adding the extensions, remember to separate them by spaces (e.g. php php3), and do not use periods with extensions.
These newly added MIME types will be available automatically. Please note that you may need to clear your cache to see this MIME type addition on the MIME Type Web page.
When no specific file is called, and Apache can't find a suitable index file to display, its default behavior is to display a listing of all files in the directory.
When you click on "Directory Listing" you can choose to have a blank listing displayed instead. This feature is useful whenever you don't want users to browse an entire directory.