Commit b4444fa1 authored by Paul Cammish's avatar Paul Cammish
Browse files

Added php configurations for webmail and phpmyadmin

parent 908937b6
......@@ -69,7 +69,7 @@
# Also sets a unique tmp directory and sessions directory.
#
php_admin_value open_basedir <%=domain_directory%>/public/:/usr/share/phpmyadmin:/var/www/webmail
php_admin_value open_basedir <%=domain_directory%>/public/
php_admin_value upload_tmp_dir <%=domain_directory%>/php_tmp/
php_admin_value session.safe_path <%=domain_directory%>/php_sessions/
......
......@@ -80,6 +80,14 @@
% end
</IfModule>
#
# Enabling PHP for phpMyAdmin
#
<Directory /usr/share/phpmyadmin >
php_admin_value open_basedir /usr/share/phpmyadmin
php_flag engine on
</Directory>
#
# Allow users to override settings via .htaccess
# and eanble PHP in
......@@ -103,7 +111,7 @@
# Also sets a unique php_tmp directory and php_sessions directory.
#
php_admin_value open_basedir <%=domain_directory%>/public/:/usr/share/phpmyadmin:/var/www/webmail
php_admin_value open_basedir <%=domain_directory%>/public/
php_admin_value upload_tmp_dir <%=domain_directory%>/php_tmp/
php_admin_value session.safe_path <%=domain_directory%>/php_sessions/
......@@ -199,6 +207,9 @@
% if mandatory_ssl?
#
# ssl-only is enabled - sending all traffic to https://
#
<IfModule rewrite_module>
#
# This redirects all accesses to the HTTPS version of the site.
......@@ -214,17 +225,26 @@
RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
% else
#
# ssl-only is not enabled - serving traffic as normal on http://
#
<IfModule rewrite_module>
<IfDefine PHPMYADMIN_FORCE_SSL>
RewriteEngine On
RewriteCond "%{HTTPS}" "off"
RewriteCond "%{HTTP_HOST}" =""
RewriteRule "^/?(phpmyadmin.*)$" "https://<%= domain %>/$1" [R=301,L]
RewriteCond "%{HTTPS}" "off"
RewriteRule "^/?(phpmyadmin.*)$" "https://%{HTTP_HOST}/$1" [R=301,L]
</IfDefine>
# Enforcing HTTPS for /phpmyadmin
RewriteEngine On
RewriteCond "%{HTTPS}" "off"
RewriteCond "%{HTTP_HOST}" = ""
RewriteRule "^/?(phpmyadmin.*)$" "https://<%= domain %>/$1" [R=301,L]
RewriteCond "%{HTTPS}" "off"
RewriteRule "^/?(phpmyadmin.*)$" "https://%{HTTP_HOST}/$1" [R=301,L]
</IfModule>
#
# Enabling PHP for phpMyAdmin
#
<Directory /usr/share/phpmyadmin >
php_admin_value open_basedir /usr/share/phpmyadmin
php_flag engine on
</Directory>
#
# Allow users to override settings via .htaccess
# and enables PHP in htdocs/.
......@@ -247,11 +267,9 @@
# Restricts PHP from leaving the public directory.
# Also sets a unique tmp directory and sessions directory.
#
php_admin_value open_basedir <%=domain_directory%>/public/:/usr/share/phpmyadmin:/var/www/webmail
php_admin_value open_basedir <%=domain_directory%>/public/
php_admin_value upload_tmp_dir <%=domain_directory%>/php_tmp/
php_admin_value session.safe_path <%=domain_directory%>/php_sessions/
#
# Prevent executing anything from a WordPress uploads directory,
# And block access to any PHP files in that directory.
......
......@@ -69,6 +69,14 @@
ErrorDocument 403 /__sympl/index.html
</LocationMatch>
#
# Enabling PHP for phpMyAdmin
#
<Directory /usr/share/phpmyadmin >
php_admin_value open_basedir /usr/share/phpmyadmin
php_flag engine on
</Directory>
#
# Allow users to override settings via .htaccess
#
......@@ -115,7 +123,7 @@
#
VirtualDocumentRoot /srv/%0/public/htdocs/
php_admin_value open_basedir /srv/%0/public/:/usr/share/phpmyadmin:/var/www/webmail
php_admin_value open_basedir /srv/%0/public/
<IfModule cgi_module>
VirtualScriptAlias /srv/%0/public/cgi-bin/
......
......@@ -94,7 +94,7 @@
VirtualDocumentRoot /srv/%0/public/htdocs/
php_admin_value open_basedir /srv/%0/public/:/usr/share/phpmyadmin:/var/www/webmail
php_admin_value open_basedir /srv/%0/public/
<IfModule cgi_module>
VirtualScriptAlias /srv/%0/public/cgi-bin/
......
......@@ -3,4 +3,7 @@
#
Alias /webmail /var/www/webmail
<Directory /var/www/webmail >
php_admin_value open_basedir /var/www/webmail
php_flag engine on
</Directory>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment