For cPanel & WHM version 58
(Home >> Security Center >> Apache mod_userdir Tweak)
mod_userdir module allows for visitors to access a user's website via a URL that contains that user's username. For example:
Most servers use the
mod_userdir Apache module as a temporary URL system that allows users to view their websites. This temporary URL system functions even if the system has not configured DNS or the domain does not yet point to the server.
When you enable the
mod_userdir module, any virtual host can access any website that uses the same IP address. It does not function only with the hostname.
The Apache mod_userdir Tweak interface allows you to disable the
mod_userdir functionality for your users.
mod_userdir access, perform the following steps:
- Select the Enable mod_userdir Protection checkbox.
mod_userdirfunctionality for specific hosts, select the appropriate Exclude Protection checkboxes.
This step allows all users to access content on the host via
mod_userdirfunctionality. It is recommend that you only enable
mod_userdirfunctionality on the DefaultHost.
- If you only wish to allow
mod_userdirfunctionality for specific additional users to access these hosts, enter their usernames in the Additional Users text box.
- Resellers can use this feature to allow their customers to access their own websites before DNS information propagates.
- To enter multiple users, separate each account name with a space.
- Click Save.
To allow all of your users to access their own accounts through via
mod_userdir functionality, but not steal any bandwidth, select the Exclude Protection checkbox for the DefaultHost (nobody) setting.
Do not select the Exclude Protection checkbox on a user's domain if you only wish to allow an individual user to access their site with a
mod_userdir URL on the default server hostname.
You own the following three cPanel accounts:
- Arthur's cPanel account (
- Betty's cPanel account (
- Charles' cPanel account (
Arthur’s domain resolves, but Betty’s and Charles’ domains do not yet resolve.
mod_userdir functionality for the server to deny one user the ability to use another user's bandwidth, select the Enable mod_userdir Protection checkbox.
However, if you still want to allow Betty and Charles to use Arthur’s domain to see their sites, perform the following steps:
- Do not select the checkbox next to
betty charlesin the Additional Users text box.
- Click Save.
Betty and Charles can browse their sites with the following URLs:
Shared SSL Certificates
If a shared SSL certificate exists for a virtual host on a shared IP address, you can share that SSL certificate with users on the same IP address. This allows them to access their sites securely without a browser warning.
For example, if an SSL certificate is installed on
host.example.com and you select the Exclude Protection checkbox for DefaultHost (nobody), the
username cPanel user can access
We strongly recommend that you restrict
mod_userdir functionality for most of your users. There are potential security issues that
mod_userdir functionality can expose.
- Anyone can access a user's content with a domain name and SSL certificate that belongs to another user. This can potentially be used for phishing attacks or other malicious content, that appears to be hosted under the target domain.
- Bandwidth is accounted for per-host rather than per-user. If someone accesses a user's content via
mod_userdir, then the system will not record their bandwidth usage correctly. This can also potentially allow for one user to use the bandwidth of another.
When you disable
mod_userdir protection for a host, we recommended that you do not exclude the entire host, but rather exclude only specific users via the Additional Users text box.
Enabled mod_userdir protection
Before you enable the
mod_userdir module, be aware of the following information:
Java servlets do not work with
mod_userdir-based URLs. This is because Tomcat requires that you add additional directives to the virtual host.
open_basedirprotection restricts PHP's access to the home directory of the user who owns the base domain, not the home directory of the user account that a visitor accesses. If you enable
open_basedirprotection in WHM's PHP open_basedir Tweak interface (Home >> Security Center >> PHP open_basedir Tweak), visitors cannot access some sites via the
Under certain conditions, a user can attack another user's account if they access a malicious script through a
Websites that use the
mod_rewriteor other directives in their
.htaccessfiles will not function correctly when visitors view them through
- If you enable Apache's
mod_userdirmodule will not function correctly. For more information, read our Apache Module: ModRuid2 documentation.
The Symlink Race Condition Protection option
The following table describes when the Symlink Race Condition Protection option blocks
|The requested URL includes a file and does not belong to the owner of the file.||Blocked.|
|The requested URL includes a file and an IP address that belongs to another account.||Blocked.|
|The requested URL contains a directory.||Not blocked.|
|You wish to access the server's hostname.||Not blocked.|
Disabled mod_userdir protection
Before you disable
mod_userdir protection, be aware of the following information:
- While this WHM feature allows you to restrict
mod_userdirfunctionality, it does not remove the module itself. Some PCI compliance scans may still detect it.
- This feature does not list IP addresses because the
mod_userdirmodule uses virtual hosts.
- You cannot use IP addresses to configure this feature.
- If you do not protect the default host, you can access the server's main IP address through the
mod_userdirmodule in most cases.