isp-tools

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 41d15bb208d1d2a0687372c1f8679872316c7325
parent b44a0c621910dcd00b6d74a4d321dba0acaa61aa
Author: Jan <devnull@localhost>
Date:   Wed, 16 Mar 2016 21:02:32 +0100

Pfad zum Fallback-Zertifikat korrigiert.

Diffstat:
update_httpd | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 64 insertions(+), 8 deletions(-)

diff --git a/update_httpd b/update_httpd @@ -60,7 +60,7 @@ sql "SELECT UNIX_TIMESTAMP(modified),domain FROM domain WHERE active=1"|while re # AUTO-GENERATED - DO NOT CHANGE! # Domain: $domain -<VirtualHost *> +<VirtualHost *:80> ServerName $domain Include $HTTPD_EXTRA_CONFIG_DIR/$domain.conf" </VirtualHost> @@ -71,7 +71,7 @@ EOF # AUTO-GENERATED - DO NOT CHANGE! # Domain $domain disabled -<VirtualHost *> +<VirtualHost *:80> ServerName $domain RewriteEngine on @@ -91,7 +91,23 @@ EOF if [ -f $HTTPD_EXTRA_CONFIG_DIR/$domain.conf ]; then extra_config=" Include $HTTPD_EXTRA_CONFIG_DIR/$domain.conf" else - extra_config= + extra_config=" # No Config in $HTTPD_EXTRA_CONFIG_DIR/$domain.conf" + fi + if [ -f $HTTPD_MYSQL_PASSWD_DIR/$domain.passwd ]; then + source $HTTPD_MYSQL_PASSWD_DIR/$domain.passwd + echo "pass ist $mysql_password" + mysql_config=$(cat << EOF +php_value mysql.default_host localhost +php_value mysql.default_user $mysql_user +php_value mysql.default_password $mysql_password + +php_value mysqli.default_host localhost +php_value mysqli.default_user $mysql_user +php_value mysqli.default_pw $mysql_password +EOF +) + else + mysql_config=" # No Mysql Config" fi @@ -103,15 +119,21 @@ EOF #echo "Logdir: $log_dir" + if [ -f /etc/ssl/local/cert/$domain.crt ]; then + crt=/etc/ssl/local/cert/$domain.crt + else + crt=/etc/ssl/local/cert/webmail.weiherhei.de.crt + fi + key=/etc/ssl/local/server.key cat > $CONFFILE <<EOF -# AUTO-GENERATED by $0 - DO NOT CHANGE! +# AUTO-GENERATED - DO NOT CHANGE! # Domain $domain User: $user -<VirtualHost *> +<VirtualHost *:80> ServerName $domain ServerAdmin webmaster@$domain @@ -122,11 +144,45 @@ EOF php_admin_value upload_tmp_dir /home/$user/tmp ErrorLog $log_dir/error.log - CustomLog $lor_dir/access.log combined + CustomLog $log_dir/access.log combined $extra_config + + $mysql_config </VirtualHost> + +<VirtualHost *:443> + ServerName $domain + ServerAdmin webmaster@$domain + + DocumentRoot $docroot + + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -r webmaster@$domain" + php_admin_value open_basedir /home/$user/var/www/$domain:/home/$user/tmp + php_admin_value upload_tmp_dir /home/$user/tmp + + ErrorLog $log_dir/error.log + CustomLog $log_dir/access.log combined + + $extra_config + $mysql_config + + + SSLEngine on + SSLCertificateFile $crt + SSLCertificateKeyFile $key + + SSLProtocol All -SSLv2 -SSLv3 + #SSLCipherSuite HIGH:MEDIUM + + SSLHonorCipherOrder On + SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS + +</VirtualHost> + EOF + + fi @@ -139,11 +195,11 @@ done # Apache-Webserver muss Konfiguration neu laden -if [ `hg -R $HTTPD_VHOST_DIR status -m -a|wc -l` -gt 0 ]; then +if [ `hg -R $HTTPD_VHOST_DIR status -m -a -u|wc -l` -gt 0 ]; then echo "Änderungen durchgeführt:" hg -R $HTTPD_VHOST_DIR diff - hg -R $HTTPD_VHOST_DIR commit -addremove -u `whoami` -m "Updating HTTPD configuration" + hg -R $HTTPD_VHOST_DIR commit -A -u `whoami` -m "Updating HTTPD configuration" if [ ! `apache2ctl -t|grep "Syntax OK"|wc -l` -eq "0" ]; then