In de afgelopen dagen heb ik een reinstall gedaan van mijn xbmc / sabnzbd box. Ik kwam van ubuntu 11.10 en draai nu 12.10. Op 11.10 draaide ik altijd nginx om via een reverse proxy on the road mijn sabnzbd ed kunnen bereiken. Voor de reinstall heb ik netjes alle config files gebackupped, maar ik kom nu niet meer tot een werkende installatie. Helaas ben ik geen linuxcrack, maar ben ook geen beginner meer. Hieronder mijn config files (ik denk dat die prima zijn). Het ip van de server is 192.168.1.14. Nginx luisterd op port 80 en laat de welcome to nginx boodschap zien. Sabnzbd draaid ook op 192.168.1.14 maar op port 8081. De proxy moet dus als volgt verwijzen:
http://192.168.1.14/sabnzbd http://192.168.1.14:8081/sabnzbd
In access.log ziet een request op /sabnzbd er nu zo uit:
/etc/nginx/nginx.conf:
/etc/nginx/conf.d/proxy.conf
/etc/nginx/sites-enabled/sabnzbd
Iemand een idee waarom nginx de reverse proxy requests niet oppakt?
http://192.168.1.14/sabnzbd http://192.168.1.14:8081/sabnzbd
In access.log ziet een request op /sabnzbd er nu zo uit:
code:
1
2
| [04/Mar/2013:09:00:54 +0100] "GET /sabnzbd HTTP/1.1" 200 133 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22" [04/Mar/2013:09:00:58 +0100] "GET / HTTP/1.1" 200 133 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, |
/etc/nginx/nginx.conf:
code:
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
78
| user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } #mail { # # See sample authentication script at: # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript # # # auth_http localhost/auth.php; # # pop3_capabilities "TOP" "USER"; # # imap_capabilities "IMAP4rev1" "UIDPLUS"; # # server { # listen localhost:110; # protocol pop3; # proxy on; # } # # server { # listen localhost:143; # protocol imap; # proxy on; # } #} |
/etc/nginx/conf.d/proxy.conf
code:
1
2
3
4
| proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
/etc/nginx/sites-enabled/sabnzbd
code:
1
2
3
4
5
6
7
8
| server { location /sabnzbd { #auth_basic "Maarten"; #auth_basic_user_file /var/www/xbmc/.htpasswd; proxy_pass http://192.168.1.14:8081/sabnzbd; } } |
Iemand een idee waarom nginx de reverse proxy requests niet oppakt?
[ Voor 1% gewijzigd door Orcie op 04-03-2013 09:48 . Reden: was net iets te snel ]