source: server/etc/apache.conf.tmpl

qndtest
Last change on this file was 37481d8, checked in by Ramón M. Gómez <ramongomez@…>, 5 years ago

#784: Apache configuration now supports connection with PHP-FPM via socket and port.

  • Property mode set to 100644
File size: 896 bytes
Line 
1# OpenGnsys Web Admin Console template configuration for Apache.
2
3Alias /opengnsys CONSOLEDIR
4
5# PHP-FPM configuration
6<IfModule proxy_fcgi_module>
7        <FilesMatch ".+\.ph(p[3457]?|t|tml)$">
8                SetHandler "proxy:fcgi://127.0.0.1:9000"
9        </FilesMatch>
10</IfModule>
11
12RewriteEngine On
13
14# Redirect HTTP to HTTPS and default configuration.
15<Directory CONSOLEDIR>
16        RewriteCond %{HTTPS} !=on
17        RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
18        Require all granted
19        Options -Indexes +FollowSymLinks
20        DirectoryIndex index.php
21        AddType octet/stream .pkg
22</Directory>
23
24# Redirect HTTP to HTTPS and RESTful configuration.
25<Directory CONSOLEDIR/rest>
26        RewriteBase /opengnsys/rest/
27        RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
28        RewriteCond %{HTTPS} !=on
29        RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
30        RewriteCond %{REQUEST_FILENAME} !-f
31        RewriteRule ^ index.php [QSA,L]
32</Directory>
Note: See TracBrowser for help on using the repository browser.