diff options
Diffstat (limited to 'server/etc/apache.conf.tmpl')
-rw-r--r-- | server/etc/apache.conf.tmpl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/server/etc/apache.conf.tmpl b/server/etc/apache.conf.tmpl index 5613bf11..ab49503d 100644 --- a/server/etc/apache.conf.tmpl +++ b/server/etc/apache.conf.tmpl @@ -1,13 +1,25 @@ -# OpenGnSys Web Console template configuration for Apache. +# OpenGnsys Web Admin Console template configuration for Apache. Alias /opengnsys CONSOLEDIR -# Overrides default CentOS php.ini configuration. -php_value short_open_tag on +RewriteEngine On +# Redirect HTTP to HTTPS and default configuration. <Directory CONSOLEDIR> + RewriteCond %{HTTPS} !=on + RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R] Require all granted Options -Indexes +FollowSymLinks DirectoryIndex index.php + AddType octet/stream .pkg </Directory> +# Redirect HTTP to HTTPS and RESTful configuration. +<Directory CONSOLEDIR/rest> + RewriteBase /opengnsys/rest/ + RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + RewriteCond %{HTTPS} !=on + RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [QSA,L] +</Directory> |