-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapache-sdca_ssl.conf
50 lines (41 loc) · 1.2 KB
/
apache-sdca_ssl.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
# Main HTTPS host
<VirtualHost *:443>
ServerName sdca.carbon.place
ServerAlias localhost
CustomLog /var/log/apache2/sdca-access.log combined
ErrorLog /var/log/apache2/sdca-error.log
DocumentRoot /var/www/sdca/sdca-website/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/sdca.carbon.place/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sdca.carbon.place/privkey.pem
# Access
<Directory /var/www/sdca/>
<RequireAny>
AuthType Basic
AuthName "Prototype site"
AuthBasicProvider file
AuthUserFile /etc/apache2/sites-enabled/sdca.htpasswd
Require expr %{REQUEST_URI} =~ m#^/api/#
Require valid-user
</RequireAny>
</Directory>
# Disable directory indexes, including in aliased locations
<Directory /var/www/sdca/>
Options -Indexes
</Directory>
# Allow rewrite rules in .htaccess
<Directory /var/www/sdca/sdca-website/>
AllowOverride FileInfo
</Directory>
# Enable PHP
AddType application/x-httpd-php .html
# Data
Alias /data /var/www/sdca/data
<FilesMatch "\.pbf$">
Header append Content-Encoding gzip
</FilesMatch>
# API - high memory, pending efficiency work
<Location /api/>
php_value memory_limit 1024M
</Location>
</VirtualHost>