Nginx – Adding backend servers and redirection

Following configuration file will reside in “/etc/nginx/config.d/”folder as described in this post Click here! This configuration will give an idea on how to listen on port 443 for SSL connections and redirect the requests to backend servers. I have also added an example to manipulate HTML contents coming form backend server on the fly using subs_filer.

server {
listen 443;
ssl on;

ssl_certificate conf/name_combined.crt;
ssl_certificate_key conf/;

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# In free version sub_filer is not available out of the box, but you can download the source code and compile it with very easy steps. subs_filter is used to manipulate the html contents/links on the fly on web site 🙂 you can replace anything with whatever you want.

Leave a Reply

Your email address will not be published. Required fields are marked *