source: server/etc/apache-console3.conf.tmpl @ 38788bf

webconsole3
Last change on this file since 38788bf was 6240405, checked in by jm.bardallo <juanmanuel.bardallo@…>, 7 years ago

Version inicial de la consola web 3.0, de momento funcionará paralelamente a la consola web antigua

  • Property mode set to 100644
File size: 1.9 KB
Line 
1# OpenGnsys Web Admin Console 3 template configuration for Apache.
2
3Alias /opengnsys3 CONSOLEDIR
4
5RewriteEngine On
6
7# Overrides default CentOS php.ini configuration.
8<IfModule mod_php5.c>
9        php_value short_open_tag on
10</IfModule>
11
12# Redirect HTTP to HTTPS and default configuration.
13<Directory CONSOLEDIR>
14        RewriteCond %{HTTPS} !=on
15        RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
16        Require all granted
17        Options -Indexes +FollowSymLinks
18        DirectoryIndex index.html index.php
19        AddType octet/stream .pkg
20</Directory>
21
22# Redirect HTTP to HTTPS and RESTful configuration.
23<Directory CONSOLEDIR/rest/web>
24        #RewriteBase /opengnsys3/rest/web
25        #RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
26        #RewriteCond %{HTTPS} !=on
27        #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
28        #RewriteCond %{REQUEST_FILENAME} !-f
29        #RewriteRule ^ index.php [QSA,L]
30        DirectoryIndex app.php
31
32        <IfModule mod_rewrite.c>
33                RewriteEngine On
34                RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
35                RewriteRule ^(.*) - [E=BASE:%1]
36
37                # Sets the HTTP_AUTHORIZATION header removed by apache
38                RewriteCond %{HTTP:Authorization} .
39                RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
40
41                RewriteCond %{ENV:REDIRECT_STATUS} ^$
42                RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
43
44                RewriteCond %{REQUEST_FILENAME} -f
45                RewriteRule .? - [L]
46
47                # Rewrite all other queries to the front controller.
48                RewriteRule .? %{ENV:BASE}/app.php [L]
49        </IfModule>
50
51        <IfModule !mod_rewrite.c>
52                <IfModule mod_alias.c>
53                        RedirectMatch 302 ^/$ /app.php/
54                </IfModule>
55        </IfModule>
56</Directory>
Note: See TracBrowser for help on using the repository browser.