• I need to restart the web server…

    Overview During certain situations you may become confused with what is wrong with your site. For example, moving WordPress or Drupal to another location or even misplacing files on your web site may lead to an erroneous conclusion that the web server must be “restarted” to clean its cache or memory…

  • Rewrite rules fail on subdirectories, subdomains, or addon domains

    Overview Rewrite rules remap a URL to another location or resource accessible on a web site. These rules are located in .htaccess files. A common snippet looks similar to: RewriteEngine On RewriteCond %{REQUEST_FILENAME} ! -f RewriteRule ^(.*)$ index.php [QSA, L] When located anywhere else besides the document root of the primary…

  • Accessing web page views and error messages

    Site statistics can be viewed, in raw form, through access logs available via /var/log/httpd/access_log. Likewise, errors that may arise from improperly-configured PHP scripts or general diagnostics are available in error logs via /var/log/httpd/error_log. These errors are typically manifested as 550, 500, 403, or status codes also more commonly referred to…

  • Changing index pages

    Overview An index page is the page a Web server pulls up for a given directory if a filename is not specified. For example, http://yourdomain.com/ will scan the document root sequentially looking for the first file match. If found, that page will be displayed. By default, the directory index order…

  • Redirecting on typo

    mod_speling may be used to correct typos in URLs. Spelling rules only allow one character translation (i.e. character capitalization, transposition, or omission) and ignores extensions such as .html. To enable spell-checking, add the following line to your .htaccess file: CheckSpelling On

  • Displaying directory contents

    If you would like for the Web server to generate a listing of all contents in a given directory, then create a file named .htaccess with the following line: Options +Indexes You will also need to remove all directory index files (e.g. index.html, index.php, index.htm, index.*) from the target directory….

  • Where is site content served from?

    Site content for a given domain or subdomain is served from its document root. A document root is the base folder from which all content is served. All accounts have a document root for the primary domain under /var/www/html. mainwebsite_html/ is a link to this location.    Sample Home Directory $ ls ~…

  • Forwarding a web site elsewhere

    Overview A forwarded website can be accomplished by first creating a subdomain or addon domain in the control panel, then using an .htaccess in document root to redirect all traffic to the new web site using mod_rewrite. Important terminology Forwarded domain: domain that will redirect to the target domain Target domain: domain…

  • Expunging PageSpeed cache

    PageSpeed will make a best effort to expire its asset (.css, .js, .png, .gif, .jpg) cache periodically. During periods of rapid changes, automatic expunction may lag behind changes pushed to a server necessitating a manual flush of the cache. Expunging PageSpeed cache A PURGE header may be sent to the asset…

  • Uploads are denied with 406, Not Acceptable

    Overview When uploading a particular file it fails with a 406, Not Acceptable error message. Cause All inbound file uploads are scanned for viruses before being saved on the server. If a file is found to contain a virus, it is rejected with a 406, Not Acceptable message. File scanning…