Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:cpanel:disable-mod-userdir-lsws-cpanel [2018/08/09 19:40]
Jackson Zhang
litespeed_wiki:cpanel:disable-mod-userdir-lsws-cpanel [2023/02/13 17:56] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== Disable mod_userdir for LSWS on cPanel ====== +~~REDIRECT>​https://docs.litespeedtech.com/lsws/cp/cpanel/tunings/#disable-mod_userdir~~
- +
-On cpanel, there is an [[https://documentation.cpanel.net/display/72Docs/Apache+mod_userdir+Tweak|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 add **"​UserDir disabled"​** to pre_virtualhost_global.conf +
- +
-vi /​etc/​apache2/​conf.d/​includes/​pre_virtualhost_global.conf +
- +
-  <​IfModule LiteSpeed>​ +
-  UserDir disabled +
-  </​IfModule>​ +
-   +
-and then add "​userdir"​ to the list of Apache modules to ignore in LSWS configuration:​Navigate to **LSWS Web Admin: Configuration > Server > General > Using Apache Configuration File > Ignore Apache Modules** and add ''​userdir''​. +
-{{ :​litespeed_wiki:​cpanel:​mod_userdir_disable_lsws.png?​300 |}} +
- +
-Restart LSWS after the configuration change. +
-  service lsws restart+
  • Admin
  • Last modified: 2018/08/09 19:40
  • by Jackson Zhang