Hello Nuxwin,
the modification will generate a new (personal) cookie if the location is /admin or /client:
- Header set Set-Cookie: "YourCookieName=YourSecret123456; path=/;"
if you try to call /pma or /tools/pma you will be redirected to the ControlPanel
- <Location /tools/pma> RewriteEngine On RewriteCond %{HTTP_COOKIE} !YourCookieName=YourSecret123456 [NC] RewriteRule .* https://admin.YourPanelURL.tld [L] </Location>
I know this is a simple cookie protection only but it will be more comfortable for the User as htaccess password Protection ... and if a User gives a htaccess password to others everyone can access htaccess protected areas ...
It would be better to use a random value for the cookie but this can be done only in the PHP sources (I dont want to touch or change it) ...
the auto PMA login from sql_manage.tpl will not work because of the header location from pma_auth.php ... and so I changed the PMA URLs to:
- nano /var/www/imscp/gui/themes/default/client/sql_manage.tpl
- change:
- pma_auth.php?id={USER_ID}
- to:
- {PMA_PATH}