php - Nginx as proxy for Lighttpd -
i try have django server nginx + gunicorn , lighttpd php. how should configure nginx proxy subdomain lighttpd?
for eg.
myawesomesite.com => dajango website (work)
cloud.myawesomesite.com => lighttpd php server (don't work)
i trying
server { listen 80; server_name cloud.awesome.eu; location / { proxy_pass http://127.0.0.1:8080; #root /var/www; } }
and ssl
server { listen 443 ssl; #ssl on; server_name cloud.awesome.eu; #root /var/www; #ssl_certificate /etc/nginx/ssl/server.crt; #ssl_certificate_key /etc/nginx/ssl/server.key; index index.php; try_files $uri $uri/ /index.php?q=$uri&$args; location / { proxy_pass http://127.0.0.1:8080; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header host cloud.awesome.com; proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; } }
all config examples nginx + apache.. dont found example nginx + lighttpd.
sorry terrible english :)
now work me!
server { listen 80; server_name cloud..eu; #change location / { proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $remote_addr; proxy_set_header host $host; proxy_pass http://127.0.0.1:8080; #root /var/www; } } server { listen 443; ssl on; server_name cloud..eu; #change #root /var/www; #change ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; location / { proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $host; proxy_set_header x-forwarded-proto $scheme; add_header front-end-https on; proxy_pass http://127.0.0.1:8080; proxy_redirect off; } }
Comments
Post a Comment