-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapache-dev.conf
More file actions
30 lines (24 loc) · 910 Bytes
/
apache-dev.conf
File metadata and controls
30 lines (24 loc) · 910 Bytes
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
<VirtualHost *:80>
ServerName dev-apache
ServerAdmin dev@aimagelab.local
DocumentRoot /var/www/html
# Static assets served directly from Apache for convenience
Alias /static /var/www/html/static-dev
<Directory "/var/www/html/static-dev">
Require all granted
ExpiresActive On
ExpiresDefault "access plus 1 minute"
Header set Cache-Control "public, max-age=60"
</Directory>
ProxyPreserveHost On
ProxyRequests Off
# Pass request details to Django
RequestHeader set X-Forwarded-Proto "http"
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
# Do not proxy static files
ProxyPass /static !
ProxyPass / http://dev-django-app:8000/
ProxyPassReverse / http://dev-django-app:8000/
ErrorLog ${APACHE_LOG_DIR}/aimagelab_dev_error.log
CustomLog ${APACHE_LOG_DIR}/aimagelab_dev_access.log combined
</VirtualHost>