User Tools

Site Tools


password

Differences

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

Link to this comparison view

password [2014/01/29 18:04] (current)
Line 1: Line 1:
 +====== Password ======
  
 +Protects your admin area.
 +
 +Basically your scj/admin folder is protected with so-called Apache authorization. But you can switch on "multiaccess". Thus you can create a list of users with different access rights for example access to rotation menu only.
 +
 +Check menu Settings - Password.
 +
 +====== php-fpm, castcgi & multiaccess problem ======
 +
 +At present time there's an issue if you use named modules and multiaccess 
 +
 +By default apaches passes PHP_AUTH_USER variable while those modules ignore it
 +
 +**Solution**
 +
 +1. add to .htaccess 
 +
 +  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
 +  
 +
 +2. add to includes/config.php 
 +
 +<code>
 +if (isset($_SERVER['HTTP_AUTHORIZATION']) && preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) {
 +    list($name, $password) = explode(':', base64_decode($matches[1]));
 +    $_SERVER['PHP_AUTH_USER'] = strip_tags($name);
 +    $_SERVER['PHP_AUTH_PW'] = strip_tags($password);
 +}  
 +
 +</code>
password.txt ยท Last modified: 2014/01/29 18:04 (external edit)