Temel Nginx konfigürasyonu Aşağıda temel konfigürasyon dosyası içeriğini bulabilirsiniz. server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /var/www/default; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } listen 443; server_name somecustomer.com.tr www.somecustomer.com.tr somecustomer.com www.somecustomer.com; root /var/www/default; index index.html index.htm; access_log /var/log/nginx/somecustomer-access.log-ssl-access.log; error_log /var/log/nginx/somecustomer-access.log-ssl-error.log; ssl on; ssl_certificate /etc/keys/somecustomer/www.somecustomer.com.tr.chained.crt; ssl_certificate_key /etc/keys/somecustomer/www.somecustomer.com.tr.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; ssl_prefer_server_ciphers on; if ($http_user_agent ~ "Windows 95|Windows 98|biz360.com|xpymep|TurnitinBot|sindice|Purebot|libwww-perl") { return 403; break; } location / { proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://iis; proxy_set_header Host $http_host; access_log /var/log/nginx/somecustomer-access.log; error_log /var/log/nginx/somecustomer-error.log; proxy_set_header X-Forwarded-Port 443; } location /blog/ { rewrite ^ http://$host$request_uri? permanent; } }