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,
Subject Author Posted

New to nginx: ssl/sticky/conditional proxying

Emarginated March 13, 2014 08:05AM

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

Emarginated March 14, 2014 11:51AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 140
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready