This is an old revision of the document!
Disable mod_userdir for LSWS on cPanel
On cpanel, there is an Apache mod_userdir tweak, which you can use to disable/enable mod_userdir
for Apache. When you are running Apache, mod_userdir is not compatible with the following modules/handlers and is actually disabled when mod_passenger, mod_ruid, mod_itk, PHP-FPM, or the CGI handler used.
Sometimes, when you disable mod_userdir on Apache, it seems to still be working with LSWS. So how do you correctly disable mod_userdir for LSWS on cpanel then?
vi /etc/apache2/conf/httpd.conf
In server level configuration:
<IfModule userdir_module> UserDir public_html <IfModule ruid2_module> UserDir disabled </IfModule> <IfModule mpm_itk.c> UserDir disabled </IfModule> <IfModule mod_passenger.c> UserDir disabled </IfModule> </IfModule>
In vhost level configuration:
<IfModule userdir_module> <IfModule !mpm_itk.c> <IfModule !ruid2_module> <IfModule !mod_passenger.c> UserDir disabled UserDir enabled check10cache </IfModule> </IfModule> </IfModule> </IfModule>
Apache may use itk
, ruid2
and/or mod_passenger
. In any of these cases, mod_userdir is disabled on Apache. LSWS does not use config for ruid2, itk and mod_passenger, hence only the following directive is applied, which actually enables mod_userdir.
UserDir public_html
To fix this, you can simply add “userdir” to the list of Apache modules to ignore in LSWS configuration and restart LSWS. Navigate to LSWS Web Admin: Configuration > Server > General > Using Apache Configuration File > Ignore Apache Modules and add userdir
.