server {
listen 80;
server_name ahmadian.sinic.ir;
server_name www.ahmadian.sinic.ir;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.112.16:8443;
}
}
server {
listen 80;
listen [::]:80;
server_name munin.downloadchibashi.com;
location ^~ /munin-cgi/munin-cgi-graph/ {
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/munin/fastcgi-graph.sock;
include fastcgi_params;
}
location /munin/static/ {
alias /etc/munin/static/;
}
location /munin/ {
fastcgi_split_path_info ^(/munin)(.*);
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/munin/fastcgi-html.sock;
include fastcgi_params;
}
}
server {
listen 80;
server_name webdisk2.downloadchibashi.com;
server_name www.webdisk2.downloadchibashi.com;
root /home/tubeuser/www/vip/static/downloads;
location / {
autoindex on;
index index.html index.htm;
charset UTF-8;
autoindex_exact_size off;
}
location ~* (\..+$) {
add_header Content-disposition "attachment";
}
}
BY: Farid Ahmadian
TAG: nginx, reverse-proxy, static-files
DATE: 2016-04-1 11:00:01
With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)