The cPanel Temporary link can be used to view a website before the website is pointed to the servers nameservers or even before it starts to resolve. This feature needs to be enabled. This can be handy to allow users to upload files to their website and then view what those files would look like once their domain name is resolving to the server.
The downside to this is that any bandwidth usage used to view the site would not be included in the user’s statistics and instead would be counted against the user “nobody”. Whilst it’s unlikely anyone would want to give out a temporary link its something all users should be aware of.
There are also some security concerns around this feature most noticeably the cPanel users username is used in the link. This can allow users to attempt to gain access to these accounts. Another security issue is the inability to use mod_ruid2 which enables Symlink Race Condition Protection. When using Mod_Userdir you cannot use mod_ruid2.
If Mod_Userdir is not enabled you will likely get a 404 error when using the cPanel temporary link to visit accounts on the server. To enable Mod_Userdir you first need to ensure mod_ruid2 is removed from the server.
Enable cPanel Temporary Link
1- Remove Mod_ruid2
In WHM select Easy Apache 4 and in the “Apache” section, enter mod_ruid2 in the search bar and uninstall the module if it’s enabled. Next, in the search bar enter mod_su. Enable mod_suexec and mod_suphp. Proceed to recompile Apache with these options.
2- In WHM select MultiPHP Manager and under PHP Handlers ensure SuPHP is being used as the handler for all PHP versions.
- But, if you change your PHP handler. You may need to update some users files and folder permissions or you could see internal server errors.
3) Now, in WHM select the Apache mod_userdir Tweak link. On the next page check the “Enable mod_userdir Protection” box. Confirm the DefaultHost (nobody) checkbox is ticked. Click save at the bottom of the page.
4) From the “List Accounts” page in WHM. Click the IP address next to an account. The cPanel temporary link page opens.
You may still find that you still get 404 error issues when using the cPanel temporary link. This is likely because the website in question is using mod_rewrite code in the .htacess file. Any site that has mod_rewrite code in this file will not work with mod_userdir.
How was this article – Enable Mod_Userdir – Enable cPanel Temporary Link
More from cPanel
How To Install A Cloudflare Origin SSL Certificate In cPanel
Free SSL Certificates from places like cPanel or Let's Encrypt are great. When Let's Encrypt first introduces free SSL Certificates …
Create a SWAP partition on CentOS, RHEL and AlmaLinux without a reboot
SWAP is a memory type that Linux NVMe VPS Servers use to process requests. Memory will be held in SWAP …
Help fixing Error: last request failed: [AUTH] Authentication failed.
The Error: last request failed: [AUTH] Authentication failed error can be caused by a range of things. It could be …