Commit 3b2648b2 authored by Emma's avatar Emma

💡 changes to fit a djember site

parent cf693c50
Pipeline #1496 skipped
......@@ -4,15 +4,15 @@ server {
listen {{cookiecutter.ip}}:443 ssl http2;
server_name {{ main_domain }};
client_max_body_size 20M;
root /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/;
root /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/back/;
index index.html;
ssl on;
ssl_certificate /etc/letsencrypt/live/{{main_domain}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{main_domain}}/privkey.pem;
location /static {
alias /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/static;
location /assets {
alias /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/back/assets;
gzip on;
gzip_vary on;
gzip_proxied any;
......@@ -23,6 +23,22 @@ server {
expires 365d;
}
location ~ /(service-worker|sw-toolbox).*\.js {
root /home/{{cookiecutter.user}}/{{cookiecutter.site}}/front/dist;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/x-javascript text/javascript;
expires 365d;
}
location ~ (crossdomain\.xml|manifest\.appcache|robot\.txt) {
root /home/{{cookiecutter.user}}/{{cookiecutter.site}}/front/dist;
}
location /uploads {
alias /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/shared/uploads;
gzip on;
......@@ -77,11 +93,11 @@ server {
# listen {{cookiecutter.ip}}:443 http2;
# server_name {{main_domain}};
# client_max_body_size 20M;
# root /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/;
# root /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/back/;
# index index.html;
#
# location /static {
# alias /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/static;
# location /assets {
# alias /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/back/assets;
# gzip on;
# gzip_vary on;
# gzip_proxied any;
......
......@@ -12,8 +12,8 @@
{% else %}
plugin=python3
{% endif %}
chdir = /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current
home = /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current
chdir = /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/back
home = /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/current/back
virtualenv = /home/{{ cookiecutter.user }}/{{ cookiecutter.site }}/venv
module = wsgi
env = DJANGO_SETTINGS_MODULE=settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment