This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

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
Thanks given by:
#2
RE: Nginx > Varnish > Apache
[Moved to proper forum section - We do not support Nginx]

I had it working with varnish the same way you did (but without nginx) then had to drop varnish because of SSL. I'm not sure if there is a way to do it or not.

Here is a good read about the situation: https://www.smashingmagazine.com/2015/09...sh-apache/
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
RE: Nginx > Varnish > Apache
(01-30-2018, 06:00 AM)TGates Wrote: [Moved to proper forum section - We do not support Nginx]

I had it working with varnish the same way you did (but without nginx) then had to drop varnish because of SSL. I'm not sure if there is a way to do it or not.

Here is a good read about the situation: https://www.smashingmagazine.com/2015/09...sh-apache/

thanks for your response, 
after too much research I think Nginx + varnish + apache on https is almost impossible ..
because sentora add ssl certificate automatically to apache vhost file and if I went to run "  Nginx + varnish + apache " on ssl I should make sentora add cer,key files path to nginx config file everytime I add new domain to may server ..
if you have any suggestion please told my, thanks,
Reply
Thanks given by:
#4
RE: Nginx > Varnish > Apache
Yeah, like I mentioned we do not support nginx, many have tried with very little success.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: Nginx > Varnish > Apache
not now nginx. Also this setup is complicated and don't see the gain chaining that way.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:


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

Forum Jump:


Users browsing this thread: 2 Guest(s)