2
Я пытаюсь прокси-сервер перенаправить клиента потоп-сети, работающего на порту 8002, на место /deluge
и оставить остальную часть местоположения /
для обслуживания каталога.nginx: Нет такой ресурс
upstream deluge {
server 127.0.0.1:8002;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
index index.html index.htm;
server_name localhost;
location/{
root /home/ubuntu/web;
autoindex on;
try_files $uri $uri/ =404;
}
location /deluge {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://deluge;
}
}
Я проверил, если потоп-веб работает:
root:~# ps -aux | grep deluge
root 7652 0.0 0.2 67896 2200 pts/0 S 23:20 0:00 sudo nohup deluge-web -p 8002
root 7653 0.0 2.2 72488 22832 pts/0 S 23:20 0:00 /usr/bin/python /usr/bin/deluge-web -p 8002
root 7743 0.0 0.0 10464 936 pts/0 S+ 23:31 0:00 grep --color=auto deluge
http://xx.xx.xx.xx/
Visting работает отлично. Но посещение http://xx.xx.xx.xx/deluge
бросает ошибку 404:
No Such Resource
No such child resource.