hello
i would like to configure my nginx server to be able to make cache via https in direction of a apache server with DNS name but i think it makes only redirection and cache doesnt work
my configuration is
nginx :10.105.56.1 nginx.com in front
apache :10.105.56.2 website.com in back
when i put nginx.com ,he makes the redirection but its website.com that appear in the url , dont know if normal and if cache works
here a part of my configuration of nginx.conf
nginx.conf listen on 8080
servername localhost
my proxy.conf file
server {
listen 80;
server_name nginx.com;
location / {
proxy_pass https://website.com;
}
}
server {
listen 443;
server_name nginx.com;
#auth_basic "Restricted Access";
#auth_basic_user_file /etc/nginx/htpasswd.users;
ssl on;
ssl_certificate /etc/nginx/nginx.com.pem;
ssl_certificate_key /etc/nginx/nginx.com.pkey;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://website.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_valid 301 1m; # Cache permanent redirects for a whole year
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
resolver website.com;
}
}
thanks for help :)
i would like to configure my nginx server to be able to make cache via https in direction of a apache server with DNS name but i think it makes only redirection and cache doesnt work
my configuration is
nginx :10.105.56.1 nginx.com in front
apache :10.105.56.2 website.com in back
when i put nginx.com ,he makes the redirection but its website.com that appear in the url , dont know if normal and if cache works
here a part of my configuration of nginx.conf
nginx.conf listen on 8080
servername localhost
my proxy.conf file
server {
listen 80;
server_name nginx.com;
location / {
proxy_pass https://website.com;
}
}
server {
listen 443;
server_name nginx.com;
#auth_basic "Restricted Access";
#auth_basic_user_file /etc/nginx/htpasswd.users;
ssl on;
ssl_certificate /etc/nginx/nginx.com.pem;
ssl_certificate_key /etc/nginx/nginx.com.pkey;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://website.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_valid 301 1m; # Cache permanent redirects for a whole year
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
resolver website.com;
}
}
thanks for help :)