Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:cache:litemage:troubleshooting:disable-litemage-on-off [2017/04/19 13:15] Michael Alegre created |
litespeed_wiki:cache:litemage:troubleshooting:disable-litemage-on-off [2017/05/08 19:35] Jackson Zhang |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== For Shared hosting, how to control LiteMage on/off and disable end-user control in .htaccess ===== | + | ===== Disabling LiteMage On/Off .htaccess Control ===== |
- | LiteMage can normally be enabled by placing "LiteMage On" in .htaccess under the user's document root. | + | |
- | For a Magento shared hosting environment, System Administrators may want to control LiteMage on/off from a global level. This can be done by placing "LiteMage Off" in the server level of Apache Configuration. This will disable the end-user from enabling LiteMage via .htaccess. Now only System Administrators can enable it by placing "LiteMage On" through Apache virtual host configuration. | + | LiteMage can be enabled for a user by placing "LiteMage On" in the .htaccess file under the user's document root. In shared hosting environments, this ability can be disabled globally to control which users are given access to LiteMage. |
- | For example, if using a cPanel server: | + | This is done by placing "LiteMage Off" in the server level Apache Configuration. System administrators can now enable LiteMage selectively by adding "LiteMage On" through Apache's virtual host configuration. |
- | One can place the following into "/etc/apache2/conf.d/includes/pre_main_global.conf" (EA4 Environment). | + | For example, if using a cPanel server (EA4 Environment): |
- | <code> | + | |
- | <IfModule LiteSpeed> | + | Add "LiteMage Off" to the existing ''<IfModule LiteSpeed>'' block in ''/etc/apache2/conf.d/includes/pre_main_global.conf''. (Create this block if it does not yet exist) |
- | LiteMage Off | + | |
- | </IfModule> | + | |
- | </code> | + | |
- | If the server-level cache root is already setup, all that needs to be done is to add "LiteMage Off" to the existing IfModule LiteSpeed block. | ||
<code> | <code> | ||
<IfModule LiteSpeed> | <IfModule LiteSpeed> | ||
- | CacheRoot /home/lscache/ | ||
LiteMage Off | LiteMage Off | ||
</IfModule> | </IfModule> | ||
Line 23: | Line 17: | ||
The above configuration will disable all end-users from being able to enable LiteMage via .htaccess. | The above configuration will disable all end-users from being able to enable LiteMage via .htaccess. | ||
- | To enable LiteMage for certain virtual hosts, System Administrators will need to enable it through virtual host include files, such as the following: "/etc/apache2/conf.d/userdata/std/2_4/$USER/yourdomain.com/litemage.conf", and place the following: | + | LiteMage can then be enabled selectively through virtual host include files, such as ''/etc/apache2/conf.d/userdata/std/2_4/$USER/yourdomain.com/litemage.conf'' and ''/etc/apache2/conf.d/userdata/ssl/2_4/$USER/yourdomain.com/litemage.conf''(Please check cpanel documentation on[[https://documentation.cpanel.net/display/EA/Modify+Virtualhost+Containers+With+Include+Files|how to Modify Virtualhost Containers With Include Files]], by adding the following block: |
<code> | <code> | ||
<IfModule LiteSpeed> | <IfModule LiteSpeed> |