-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathhttpd.conf
67 lines (52 loc) · 1.89 KB
/
httpd.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
ServerTokens Prod
ServerSignature Off
TraceEnable Off
PidFile run/httpd.pid
ServerRoot "/etc/httpd"
ServerName {{ .ServerName }}
User apache
Group apache
Listen {{ .Port }}
TypesConfig /etc/mime.types
Include conf.modules.d/*.conf
{{- if .TLS }}
## TODO: fix default ssl.conf to comment not available tls certs. Than we can remove this condition
Include conf.d/*.conf
{{- end }}
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
CustomLog /dev/stdout combined env=!forwarded
CustomLog /dev/stdout proxy env=forwarded
## set default apache log level to info from warning
LogLevel debug
{{- if .TLS }}
SetEnvIf X-Forwarded-Proto https HTTPS=1
## SSL directives
SSLEngine on
SSLCertificateFile "{{ .SSLCertificateFile }}"
SSLCertificateKeyFile "{{ .SSLCertificateKeyFile }}"
{{- end }}
<VirtualHost *:{{ .Port }}>
## Vhost docroot
DocumentRoot "/var/www/"
## Alias declarations for resources outside the DocumentRoot
Alias /dashboard/static "/usr/share/openstack-dashboard/static"
## Directories, there should at least be a declaration for /var/www/
<Directory "/var/www/">
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride None
Require all granted
</Directory>
## Logging
ErrorLog /dev/stdout
ServerSignature Off
CustomLog /dev/stdout "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" env=forwarded
## RedirectMatch rules
RedirectMatch permanent ^/$ "{{ .horizonEndpoint }}/dashboard"
## WSGI configuration
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess apache display-name=horizon group=apache processes=4 threads=1 user=apache
WSGIProcessGroup apache
WSGIScriptAlias /dashboard "/usr/share/openstack-dashboard/openstack_dashboard/wsgi.py"
</VirtualHost>