Nginx > Varnish > Apache
#1
Nginx > Varnish > Apache
hello,
I successfully install Nginx & Varnish and link redirect to Apache ..
Now in my server:
For HTTP
Nginx is listen to 80 and redirect to 8083
Varnish is listen to 8083 and redirect to 8081
Apache listen to 8081

this work very will on port 80

but my problem is in port 443 how I can do it :/
I mean:
Nginx listen to 443 and redirect to 8083
Varnish listen to 8083 and redirect to 8081
Apache listen to 8081

my Nginx configuration file is:

user nginx;
worker_processes 2; #this number should be as same as your CPU core

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

events {
    worker_connections 1024; #this number indicates the connections, may be larger for large server
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;
    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';
    access_log /var/log/nginx/access.log main;
    sendfile on;
    keepalive_timeout 65;
    gzip on;
    gzip_min_length 1100;
    gzip_buffers 4 32k;
    gzip_types text/plain application/x-javascript text/xml text/css;
    gzip_vary on;

    server {
            listen 80 default_server;
listen 443;

                    location / {
                            proxy_set_header Host $host;
                            proxy_pass http://127.0.0.1:8083;
                        }

                        location ~ /\.ht {
                                deny all;
                        }
        }
}

------------
this file work for port 80 but not work for 443

thanks
Reply


Messages In This Thread
Nginx > Varnish > Apache - by mohamadcom - 01-28-2018, 11:47 PM
RE: Nginx > Varnish > Apache - by TGates - 01-30-2018, 06:00 AM
RE: Nginx > Varnish > Apache - by mohamadcom - 01-31-2018, 02:29 AM
RE: Nginx > Varnish > Apache - by TGates - 01-31-2018, 02:33 AM
RE: Nginx > Varnish > Apache - by Me.B - 01-31-2018, 04:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
apache 2.2 end of life Me.B 3 13 ,082 07-24-2017, 08:39 AM
Last Post: Me.B
Varnish & Nginx & Apache & Zpanel & MySQLTuner & ApachebuddyTuner DimitarBG 2 16 ,794 12-19-2014, 06:09 PM
Last Post: Me.B
MariaDB, PHP5.5 and nginx tkramer 3 18 ,966 09-23-2014, 04:19 AM
Last Post: Me.B

Forum Jump:


Users browsing this thread: 1 Guest(s)