Hi Guys,
i want to run Nginx as loadbalancer and ssl termination.
client<--ssl-->nginx<--http-->backend
My problem is that css is not working/downloaded.
Is there something to edit in tomcat ?
My nginx.conf
worker_processes 1;
#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
#pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
#Access Log
access_log /var/log/nginx/access.log;
#Cache Pfad
proxy_cache_path /tmp/nginx/cache levels=1:2 keys_zone=one:10m;
sendfile on;
tcp_nopush on;
#keepalive_timeout 30;
keepalive_timeout 65;
tcp_nodelay on;
#Daten werden gepackt
gzip on;
# Ausser für IE bis 7
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
upstream backend {
server 192.168.21.113:8080;
}
server {
listen 80;
server_name 192.168.21.43;
rewrite ^(.*) https://192.168.21.43/request_uri? permanent;
}
server {
listen 443;
server_name 192.168.21.43;
ssl on;
ssl_certificate /etc/nginx/cert/server.crt;
ssl_certificate_key /etc/nginx/cert/server.key;
location / {
proxy_pass http://backend;
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_redirect off;
}
}
}
Thanks for your help.