diff -Nur smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/AllowOverrideAll smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/AllowOverrideAll --- smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/AllowOverrideAll 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/AllowOverrideAll 2015-11-18 14:34:49.008888523 +0100 @@ -0,0 +1 @@ +disabled diff -Nur smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/Https smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/Https --- smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/Https 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/Https 2015-11-18 14:51:46.733746836 +0100 @@ -0,0 +1 @@ +enabled diff -Nur smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/Indexes smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/Indexes --- smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/Indexes 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/Indexes 2015-11-18 14:33:58.992216024 +0100 @@ -0,0 +1 @@ +disabled diff -Nur smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/SymLinks smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/SymLinks --- smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/db/configuration/defaults/wordpress/SymLinks 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/db/configuration/defaults/wordpress/SymLinks 2015-11-18 14:33:37.533640385 +0100 @@ -0,0 +1 @@ +disabled diff -Nur smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress --- smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress 2015-11-16 21:09:25.149054143 +0100 +++ smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress 2015-11-18 14:48:29.030176746 +0100 @@ -53,19 +53,25 @@ $OUT .= "# wordpress - $name\n"; $OUT .= "#------------------------------------------------------------\n"; - { - if (exists $wordpress{'URL'}) - { $OUT .= "Alias /$wordpress{'URL'} /usr/share/wordpress\n"; } - } - - $OUT .= "Alias /wordpress /usr/share/wordpress\n"; + if (exists $wordpress{'URL'}) { + $OUT .= "Alias /$wordpress{'URL'} /usr/share/wordpress\n"; + } + + else { + $OUT .= "Alias /wordpress /usr/share/wordpress\n"; + } + $OUT .= "\n"; $OUT .= "\n"; $OUT .= " AddType application/x-httpd-php .php\n"; $OUT .= " php_admin_value open_basedir /usr/share/wordpress:/etc/wordpress:/tmp/:/usr/share/pear:/usr/share/php/\n"; - $OUT .= " Options None\n"; - $OUT .= " order deny,allow\n"; + $OUT .= " Options "; + $OUT .= " FollowSymLinks " if ( ($wordpress{'SymLinks'} || 'disabled') eq 'enabled'); + $OUT .= " Indexes " if ( ($wordpress{'Indexes'} || 'disabled') eq 'enabled'); + $OUT .= " None " if ((($wordpress{'Indexes'} || 'disabled') ne 'enabled') && (($wordpress{'SymLinks'} || 'disabled') ne 'enabled')); + $OUT .= "\n AllowOverride All" if ( ($wordpress{'AllowOverrideAll'} || 'disabled') eq 'enabled'); + $OUT .= "\n order deny,allow\n"; $OUT .= " deny from all\n"; $OUT .= " allow from $allow\n"; $OUT .= " php_value mysql.default_host $wordpress{DbName}\n"; diff -Nur smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30wordpressAlias smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30wordpressAlias --- smeserver-wordpress-1.2.NfrHttpdDirective.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30wordpressAlias 2015-11-16 21:09:25.149054143 +0100 +++ smeserver-wordpress-1.2.NfrHttpdDirective.new/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30wordpressAlias 2015-11-18 15:03:08.087914421 +0100 @@ -2,11 +2,17 @@ my $status = $wordpress{'status'} || "disabled"; return " # wordpress is disabled in this VirtualHost" unless $status eq 'enabled'; + my $HTTPS = $wordpress{'Https'} || 'enabled'; - $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; - if (($port eq "80") && ($haveSSL eq 'yes')) - { - $OUT .= " RewriteRule ^/wordpress(/.*|\$) https://%{HTTP_HOST}/wordpress\$1 [L,R]\n"; - } + $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; + if (($port eq "80") && ($haveSSL eq 'yes') && ($HTTPS eq 'enabled')) + { + if (exists $wordpress{'URL'}) { + $OUT .= " RewriteRule ^/$wordpress{'URL'}(/.*|\$) https://%{HTTP_HOST}/$wordpress{'URL'}\$1 [L,R]\n"; + } + else { + $OUT .= " RewriteRule ^/wordpress(/.*|\$) https://%{HTTP_HOST}/wordpress\$1 [L,R]\n"; + } + } }