Introduction
In some instances it may be desired to view a website using a URL that includes a cPanel username as opposed to the domain name associated with the cPanel account. For example, when the domain name does not resolve to your cPanel server. The Apache mod_userdir
module enables this.
URLs can match the following format:
https://host.example.com/~username
https://192.168.0.20/~username
Please note that "host.example.com" must be replaced by your server's hostname. The server's hostname must resolve to the account's IP address.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Navigate to "Home / Security Center / Apache mod_userdir Tweak."
- Select the "Enable mod_userdir Protection."
- Select "Exclude Protection" for "DefaultHost (nobody)."
- Click the "Save" button.
Installing mod_passenger
will disable mod_userdir
.
The following PHP handlers do not allow you to use the Apache mod_userdir
module.
- PHP via CGI
- FastCGI
- PHP-FPM