-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.site
77 lines (54 loc) · 2.07 KB
/
nginx.site
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/letsencrypt/live/{{ audioloader_hostname }}/cert.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/{{ audioloader_hostname }}/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/{{ audioloader_hostname }}/chain.pem; # managed by Certbot
ssl_stapling on; # managed by Certbot
ssl_stapling_verify on; # managed by Certbot
root /var/www/audioloader/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name {{ audioloader_hostname }};
location /music/ {
alias /media/music/;
autoindex on;
allow all;
}
set $loggable 1;
if ($request_filename ~ poll_currentsong){
set $loggable 0;
}
access_log /var/log/nginx/access.log combined if=$loggable;
location / {
#include uwsgi_params;
#uwsgi_pass unix:/var/www/audioloader/audioloader.sock;
proxy_pass http://localhost:3400/;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /data/ {
deny all;
}
client_max_body_size 500m;
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
listen 80;
listen [::]:80;
server_name {{ audioloader_hostname }};
root /var/www/audioloader/html;
index index.html;
location / {
rewrite ^/(.*)$ https://{{ audioloader_hostname }}/$1 permanent;
}
}