Nginx SSL Virtualhost işlemleri
September 21, 2024 - 12:50:52 —
CaylakPenguen
Elimizde bulunan ticari SSL sertifikalarını değerlendirmek ve detaylarla uğraşmadan dakikalar içinde sitenizi hazır hale getirebilirsiniz.
Örnek Nginx VirtualHost configurasyon dosyası.
server { ####### listen 80; server_name graylog.domain.com; location / { proxy_set_header Host $http_host; 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_set_header X-Graylog-Server-URL http://$server_name/; proxy_pass http://10.11.20.253:9000; } ###### Kendinize gore duzenlenecek....... listen [::]:443 ssl http2; #ipv6 yoksa # ile kapatabilirsiniz. listen 443 ssl http2; ssl_certificate /etc/nginx/ssl/graylog.domain.com/fullchain.pem; # Acik key ssl_certificate_key /etc/nginx/ssl/graylog.domain.com/privkey.pem; # Gizli key include /etc/nginx/ssl/options-ssl-nginx.conf; ssl_dhparam /etc/nginx/ssl/ssl-dhparams.pem; } ##################### #ssl siteye Yonlendirmek icindir server { if ($host = graylog.domain.com) { return 301 https://$host$request_uri; } # listen 80; listen [::]:80; server_name graylog.domain.com; return 404; # } #######################################
options-ssl-nginx.conf
# This file contains important security parameters. If you modify this file # manually, Certbot will be unable to automatically provide future security # updates. Instead, Certbot will print and log an error message with a path to # the up-to-date file that you will need to refer to when manually updating # this file. Contents are based on https://ssl-config.mozilla.org ssl_session_cache shared:le_nginx_SSL:10m; ssl_session_timeout 1440m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers off; ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
ssl-dhparams.pem
-----BEGIN DH PARAMETERS----- MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz +8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a 87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7 YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi 7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg== -----END DH PARAMETERS-----