Mise à jour de 'nginx/sites-available/pc-dev.conf'
This commit is contained in:
parent
1a6cb3b4fb
commit
69de6a6ba0
|
@ -25,37 +25,46 @@ server {
|
|||
include common.conf;
|
||||
include ssl.conf;
|
||||
|
||||
# Accept bigger requests (files upload)
|
||||
client_max_body_size 5m;
|
||||
|
||||
ssl_certificate /etc/dehydrated/certs/v5.planet-casio.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/dehydrated/certs/v5.planet-casio.com/privkey.pem;
|
||||
|
||||
# Accept bigger requests (for file uploads)
|
||||
client_max_body_size 5m;
|
||||
|
||||
access_log /var/log/nginx/pc-dev_access.log;
|
||||
access_log /var/log/nginx/pc-dev_json_access.log json_analytics;
|
||||
error_log /var/log/nginx/pc-dev_error.log;
|
||||
|
||||
root /home/pc-dev/www;
|
||||
|
||||
# Serve files from /static as static files
|
||||
location /static {
|
||||
alias /home/pc-dev/www/app/static;
|
||||
location /static/ {
|
||||
alias /home/pc-dev/www/app/static/;
|
||||
try_files $uri =404;
|
||||
expires 10m;
|
||||
add_header Cache-Control "public";
|
||||
include gzip.conf;
|
||||
}
|
||||
# Serve emoji picker
|
||||
location /static/scripts/emoji-picker-element/ {
|
||||
alias /home/pc-dev/extra/emoji-picker-element/;
|
||||
try_files $uri =404;
|
||||
expires 24h;
|
||||
add_header Cache-Control "public";
|
||||
include gzip.conf;
|
||||
}
|
||||
|
||||
# Serve avatars
|
||||
location /avatar {
|
||||
location /avatar/ {
|
||||
root /home/pc-dev/data;
|
||||
try_files $uri /avatar/default_avatar.png =404;
|
||||
expires max; # avatars have their own cache control system
|
||||
expires max;
|
||||
add_header Cache-Control "public";
|
||||
include gzip.conf;
|
||||
}
|
||||
|
||||
# Serve files
|
||||
location /fichiers {
|
||||
location /fichiers/ {
|
||||
alias /home/pc-dev/data/fichiers;
|
||||
try_files $uri =404;
|
||||
expires max;
|
||||
|
|
Loading…
Reference in New Issue