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; 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; 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
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; 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; 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