-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoracc-vhost-ssl.conf
52 lines (47 loc) · 1.86 KB
/
oracc-vhost-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
51
52
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName build-oracc.museum.upenn.edu
DocumentRoot "/home/oracc/www"
ScriptAliasMatch ^/cgi-bin/(.*$) "/home/oracc/www/cgi-bin/$1"
ErrorLog "/var/log/apache2/oracc-error_log"
CustomLog "/var/log/apache2/oracc-access_log" common
<Directory "/home/oracc/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
<Directory "/home/oracc/www/cgi-bin">
AllowOverride None
Options ExecCGI
Require all granted
</Directory>
#WSGIScriptAlias /oracc-rest-api /var/www/oracc-rest/oracc-rest.wsgi
<Location /oracc-rest-api>
ProxyPass http://localhost:5001
</Location>
RewriteEngine on
# oracc-rest
RewriteCond %{REQUEST_URI} "^/oracc-rest-api/"
RewriteRule ^ - [L]
# Angular website config - rewrites routes back to /new/index.html
RewriteCond %{REQUEST_FILENAME} "^/search/?"
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteCond %{REQUEST_FILENAME} "^/search(/.*)?$"
RewriteRule ^ /search/index.html [L]
# Previous rewrite rules:
RewriteCond /home/oracc/www/%{REQUEST_FILENAME} -f
RewriteRule ^(.+)$ - [L]
RewriteCond /home/oracc/www/%{REQUEST_FILENAME} -d
RewriteCond %{QUERY_STRING} =""
RewriteRule ^(.+[^/])$ $1/ [R,L]
RewriteCond /home/oracc/www/%{REQUEST_FILENAME}/index.html -f
RewriteCond %{QUERY_STRING} =""
RewriteRule ^(.+)/?$ $1/index.html [L]
RewriteRule \.(?:css|js|html|xml)$ - [L]
RewriteRule ^(.*)$ /cgi-bin/wx$1 [T=application/x-httpd-cgi,L]
SSLEngine on
SSLCertificateKeyFile /etc/ssl/private/build-oracc.key
SSLCertificateFile /etc/ssl/certs/build-oracc.pem
</VirtualHost>