Press enter to see results or esc to cancel.

Nginx > SSL > Tomcat

Merhabalar, tomcat’in SSL yapilandirmasini yapmaktansa Nginx uzerinden yapmayi tercih ederim. 🙂

Calismasi :

Internet > Nginx_SSL > Tomcat

Yapilandirma dosyasi (kendime ait) :

vim /etc/nginx/conf/murat.conf

server {
listen 80;
return 301 https://$host$request_uri; #http > https yonlendirmesi
}

#https yapilandirmasi
server {
listen 443;
server_name murat.ws;

ssl_certificate /etc/nginx/ssl/muratws.crt;
ssl_certificate_key /etc/nginx/ssl/muratws.key;

ssl on;
location / {
proxy_redirect off;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://www.murat.ws:8080;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
client_body_buffer_size 256k;
proxy_busy_buffers_size 256k;
}
}

conf dosyasi kaydedildikten sonra /etc/init.d/nginx restart komutuyla nginx yeniden baslatilir.