Skip to content
Snippets Groups Projects
Verified Commit a1d817f8 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

role/archweb: serve the files locally instead of from cloudfront

parent 4058d521
No related branches found
No related tags found
No related merge requests found
......@@ -37,14 +37,12 @@ SESSION_COOKIE_SECURE = True
## static files URL
STATIC_URL = '/static/'
STATIC_URL = 'https://d11xdyzr0div58.cloudfront.net/static/'
## location for saving dev pictures
MEDIA_ROOT = '/srv/http/vhosts/archlinux.org/img'
MEDIA_ROOT = '{{ archweb_dir }}/media/img'
## web url for serving image files
MEDIA_URL = '/img/'
MEDIA_URL = 'https://d11xdyzr0div58.cloudfront.net/img/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = {{ archweb_secret_key }}
......@@ -53,6 +51,6 @@ SECRET_KEY = {{ archweb_secret_key }}
ALLOWED_HOSTS = ['{{ archweb_domain }}']
## CDN settings
CDN_ENABLED = True
CDN_ENABLED = False
# vim: set ts=4 sw=4 et:
......@@ -29,6 +29,14 @@ server {
ssl_certificate_key /etc/letsencrypt/live/{{ archweb_domain }}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{ archweb_domain }}/chain.pem;
location /static {
alias {{ archweb_dir }}/collected_static;
}
location /img {
alias {{ archweb_dir }}/media/img;
}
location / {
include uwsgi_params;
uwsgi_pass archweb;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment