Apache EHCP Template Changes and Symlink Fixes
This commit is contained in:
parent
db1bcf9df5
commit
fa627f61b9
6 changed files with 100 additions and 2 deletions
|
@ -31,6 +31,22 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
</VirtualHost>
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
|
|
@ -3223,6 +3223,20 @@ function installPipManuallyIfNeeded(){
|
|||
cd "$curDir"
|
||||
}
|
||||
|
||||
function createSymlinks(){
|
||||
if [ ! -e "/var/www/new/ehcp/webmail" ] && [ -e "/usr/share/roundcube" ]; then
|
||||
ln -s /usr/share/roundcube /var/www/new/ehcp/webmail
|
||||
fi
|
||||
|
||||
if [ ! -e "/var/www/new/ehcp/phpmyadmin" ] && [ -e "/usr/share/phpmyadmin" ]; then
|
||||
ln -s /usr/share/phpmyadmin /var/www/new/ehcp/phpmyadmin
|
||||
fi
|
||||
|
||||
if [ ! -e "/var/www/new/phpmyadmin" ] && [ -e "/usr/share/phpmyadmin" ]; then
|
||||
ln -s /usr/share/phpmyadmin "/var/www/new/phpmyadmin"
|
||||
fi
|
||||
}
|
||||
|
||||
###############################
|
||||
###START OF SCRIPT MAIN CODE###
|
||||
###############################
|
||||
|
@ -3454,6 +3468,9 @@ syncDomainsEHCP
|
|||
echo -e "Enabling postfix submission port (587)...\n"
|
||||
postfixEnableSubmissionPortByDefault
|
||||
|
||||
# Create symlinks
|
||||
createSymlinks
|
||||
|
||||
echo -e "Restarting web services, synchronizing domains, and finalizing installation!\n"
|
||||
# Start the services and sync domains
|
||||
finalize
|
||||
|
|
|
@ -30,7 +30,23 @@
|
|||
</Files>
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
</VirtualHost>
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
|
|
@ -39,6 +39,22 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
|
|
@ -31,6 +31,22 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
|
|
@ -2930,6 +2930,20 @@ function installPipManuallyIfNeeded(){
|
|||
cd "$curDir"
|
||||
}
|
||||
|
||||
function createSymlinks(){
|
||||
if [ ! -e "/var/www/new/ehcp/webmail" ] && [ -e "/usr/share/roundcube" ]; then
|
||||
ln -s /usr/share/roundcube /var/www/new/ehcp/webmail
|
||||
fi
|
||||
|
||||
if [ ! -e "/var/www/new/ehcp/phpmyadmin" ] && [ -e "/usr/share/phpmyadmin" ]; then
|
||||
ln -s /usr/share/phpmyadmin /var/www/new/ehcp/phpmyadmin
|
||||
fi
|
||||
|
||||
if [ ! -e "/var/www/new/phpmyadmin" ] && [ -e "/usr/share/phpmyadmin" ]; then
|
||||
ln -s /usr/share/phpmyadmin "/var/www/new/phpmyadmin"
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################
|
||||
# End Functions & Start Install #
|
||||
#############################################################
|
||||
|
@ -3119,6 +3133,9 @@ syncDomainsEHCP
|
|||
# Enable postfix submission port by default
|
||||
postfixEnableSubmissionPortByDefault
|
||||
|
||||
# Create symlinks
|
||||
createSymlinks
|
||||
|
||||
# Restart neccessary daemons
|
||||
echo "Initializing the EHCP Daemon"
|
||||
restartDaemons
|
||||
|
|
Loading…
Reference in a new issue