Answer the question
In order to leave comments, you need to log in
Proxy server from NGINX with ssl?
Hello
I want to set up nginx as a proxy for sites, because there is a vps server, but tun, tap is
prohibited there
server {
listen 33445;
listen 33446 ssl;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
resolver 8.8.8.8;
proxy_pass $scheme://$http_host$uri$is_args$args;
}
}
Answer the question
In order to leave comments, you need to log in
You are messing around, deploy a vpn or a real proxy (try 3proxy pretty simple setup)
It seems to me that the ssl_protocols section is redundant. This is how it works for me:
upstream backend {
server 10.10.10.10;
keepalive 70;
}
server {
listen 80;
listen 443 ssl;
server_name test.com;
ssl_certificate /etc/nginx/cert/test_pub.crt;
ssl_certificate_key /etc/nginx/cert/test_priv.key;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/log/nginx/test.com.access.log;
error_log /var/log/nginx/test.com.error.log;
location / {
expires -1s;
proxy_cache off;
proxy_pass http://backend;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question