-
Notifications
You must be signed in to change notification settings - Fork 3
/
wwwsite.conf
38 lines (27 loc) · 1.04 KB
/
wwwsite.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot ${APACHE_DOCROOT}
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} http [OR]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ - [env=proto:http]
RewriteCond %{HTTP:X-Forwarded-Proto} https [OR]
RewriteCond %{HTTPS} =on
RewriteRule ^(.*)$ - [env=proto:https]
RewriteCond %{HTTP_HOST} !^www\.(.+)$ [NC]
RewriteRule ^(.*)$ %{ENV:proto}://www.%{HTTP_HOST}$1 [R=301,L]
<Directory ${APACHE_DOCROOT}>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /dev/stdout
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /dev/stdout combined
DirectoryIndex /index.php index.php index.html
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
</VirtualHost>