You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
location YNH_WWW_PATH {
|
|
|
|
# Path to source
|
|
root /home/huginn/huginn/public;
|
|
|
|
|
|
|
|
|
|
## @huginn is a named location for the upstream fallback, see below.
|
|
try_files $uri $uri/index.html $uri.html @huginn;
|
|
|
|
|
|
|
|
# Include SSOWAT user panel.
|
|
#include conf.d/yunohost_panel.conf.inc;
|
|
}
|
|
|
|
location @huginn {
|
|
## If you use HTTPS make sure you disable gzip compression
|
|
## to be safe against BREACH attack.
|
|
gzip off;
|
|
|
|
proxy_read_timeout 300;
|
|
proxy_connect_timeout 300;
|
|
proxy_redirect off;
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-Ssl on;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Frame-Options SAMEORIGIN;
|
|
|
|
proxy_pass http://unix:/home/huginn/huginn/tmp/sockets/unicorn.socket;
|
|
}
|
|
|
|
## Enable gzip compression as per rails guide:
|
|
## http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression
|
|
|
|
location ~ ^/(assets)/ {
|
|
root /home/huginn/huginn/public;
|
|
gzip_static on; # to serve pre-gzipped version
|
|
expires max;
|
|
add_header Cache-Control public;
|
|
}
|