Welcome! Log In Create A New Profile

Advanced

Re: New to nginx: ssl/sticky/conditional proxying

March 14, 2014 11:51AM
Oh, well, thanks for the warm welcome! :)
Just kidding, i'm going on reading documentantio and now i have a semi-functional nginx.conf.
I miss something, so maybe someone coul help me on the "conditions".

I need to send IP to specific BACKEND server.


worker_processes 4;
worker_priority -1;
worker_rlimit_nofile 8192;
worker_cpu_affinity 0001 0010 0100 1000;
user nginx;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
multi_accept on;
worker_connections 4096;
}


http {
####SSL
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_certificate include/cert.pem;
ssl_certificate_key include/key.pem;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

###LOG
log_format apache
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$http_cookie"';
access_log /var/log/nginx/access.log apache;

###### UPSTREAM
upstream apache{
sticky;
server localhost:81;
server localhost:82;
server localhost:83;
}

####CORE
server {
listen *:80;
listen *:443 ssl;
keepalive_timeout 70;

#### REVERSE PRXYING
location / {
proxy_set_header Host $host;
proxy_pass http://apache; <-- do i send also HTTPS requestes?)
---> i see that connecting to nginx on port 443 redirect me to backend, but not sure if it is running on https there).

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
include /etc/nginx/mime.types;
}
}
}


Thank you.

Regards,
SubjectAuthorPosted

New to nginx: ssl/sticky/conditional proxying

EmarginatedMarch 13, 2014 08:05AM

Re: New to nginx: ssl/sticky/conditional proxying

EmarginatedMarch 14, 2014 11:51AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
Record Number of Users: 5 on November 26, 2014
Record Number of Guests: 173 on November 26, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready