Ver Fonte

Add a separate authentication for PHPMyAdmin

Emmanuel Bouthenot há 9 anos atrás
pai
commit
8bb48cf251

+ 6 - 0
roles/webserver/defaults/main.yml

@@ -22,7 +22,9 @@ fpm_max_spare_servers: 3
 
 with_php: False
 with_php_lt_54: False
+
 phpsyscheck_vhostname: sys.localhost
+
 php_config:
   - key: 'date.timezone'
     value: 'Europe/Paris'
@@ -50,7 +52,11 @@ with_php_apc: False
 
 with_phpmyadmin: False
 phpmyadmin_vhostname: pma.localhost
+http_auth_phpmyadmin_username: ''
+http_auth_phpmyadmin_password: ''
 
+http_auth_user_name: ''
+http_auth_user_password: ''
 http_auth_admin_password: seVDetGvSs7nA # openssl passwd -crypt adm123in
 
 # vim: ft=yaml

+ 3 - 0
roles/webserver/templates/apache2/auth_admin.j2

@@ -1 +1,4 @@
 admin:{{ http_auth_admin_password }}
+{% if http_auth_user_name != '' and http_auth_user_password != '' %}
+{{ http_auth_user_name }}:{{ http_auth_user_password }}
+{% endif %}

+ 3 - 0
roles/webserver/templates/nginx/auth_admin.j2

@@ -1 +1,4 @@
 admin:{{ http_auth_admin_password }}
+{% if http_auth_user_name != '' and http_auth_user_password != '' %}
+{{ http_auth_user_name }}:{{ http_auth_user_password }}
+{% endif %}