This is an old revision of the document!


How to disable mod_userdir for LSWS on cpanel?

On cpanel, there is a Apache mod_userdir Tweak, which you can use it to disable/enable mod_userdir for apache. Sometimes, even you disable mod_userdir on apache, but it seems still working with LSWS. Why and how to disable mod_uderdir for LSWS on cpanel then?

vi /etc/apache2/conf/httpd.conf

On 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>

On vhost level config:

<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 or/and mod_passenger. In any of the cases, mod_userdir is disabled on Apache. LSWS does not use config for ruid2, itk and mod_passenger, hence only the following applied, which actually enable mod_userdir.

UserDir public_html

To fix this, you can simply add “userdir” to apache ignore module (LSWS Web Admin: Configuration → Server → General → Using Apache Configuration File → Ignore Apache Modules → then add “userdir”)in LSWS configuration and restart LSWS.

  • Admin
  • Last modified: 2018/08/02 13:36
  • by Jackson Zhang