-
Notifications
You must be signed in to change notification settings - Fork 4
/
apache-collab-coursebook.conf
54 lines (38 loc) · 1.22 KB
/
apache-collab-coursebook.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
<VirtualHost *:80>
ServerName $SUBDOMAIN
ServerAdmin $MAILADDRESS
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /srv/collab-coursebook/static
<Directory /srv/collab-coursebook/static>
Require all granted
</Directory>
Alias /media /srv/collab-coursebook/media
<Directory /srv/collab-coursebook/media>
Require all granted
</Directory>
ProxyPassMatch ^/static/ !
ProxyPassMatch ^/media/ !
ProxyPass / uwsgi://127.0.0.1:3035/
RewriteEngine on
RewriteCond %{SERVER_NAME} =$SUBDOMAIN
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName $SUBDOMAIN
ServerAdmin $MAILADDRESS
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /srv/collab-coursebook/static
<Directory /srv/collab-coursebook/static>
Require all granted
</Directory>
ProxyPassMatch ^/static/ !
ProxyPass / uwsgi://127.0.0.1:3035/
ProxyPassReverse / uwsgi://127.0.0.1:3035/
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile $PATHTOfullchain.pem
SSLCertificateKeyFile $PATHTOprivkey.pem
</VirtualHost>
</IfModule>