Welcome! Log In Create A New Profile

Advanced

Virtual IP addresses

Posted by JackLevin 
Virtual IP addresses
September 05, 2014 09:52AM
Hi,

I compiled and installed NGINX 1.6.1 RHEL server. I want to run NGINX as Reverse Proxy server connecting to different backend servers. Because the users of the Reverse Proxies are not form the same department, I want to give every epartment it's own URL heading to one of my virtual IP addresses on RHEL.

n x Backend <---> NGINX Reverse Proxy with n virtual IPs <----> accessable via DNS

My current configuration opens only one Socket at 0.0.0.0:443. Actually I wanted NGINX to open several sockets one for each of my virtual IPs. How is that done by the configuration file?

BR

Current Configuration:
=========================================
user nobody;
worker_processes 1;

error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
#pid logs/nginx.pid;


events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
include /srv/www/nginx/conf/rp_instance_https_101.conf;
include /srv/www/nginx/conf/rp_instance_https_102.conf;
include /srv/www/nginx/conf/rp_instance_https_103.conf;
}

===============================================
include /srv/www/nginx/conf/http_conf/rp_instance_htts_101.conf (virtual IP: 1.2.3.4):
===============================================
## Basic reverse proxy server ##
upstream backend_instance_001 {
server 10.1.1.100:8080;
}

## Start HTTPS ##
server {
listen 443 ssl;
server_name 1.2.3.4;
keepalive_timeout 70;
ssl_certificate /srv/www/nginx/conf/ssl.crt/instance_001.saphosting.de.crt;
ssl_certificate_key /srv/www/nginx/conf/ssl.key/instance_001.saphosting.de.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

access_log /srv/www/nginx/logs/intance_001.access.log;
error_log /srv/www/nginx/logs/instance_001.error.log;
root /usr/share/nginx/html;
index index.html index.htm;

## send request back to backend ##
location / {
proxy_pass http://backend_instance_001/;
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 $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}



Edited 1 time(s). Last edit at 09/05/2014 09:56AM by JackLevin.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 223
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready