Files
finance/nginx/default.conf
T

66 lines
1.8 KiB
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server {
listen 80; # 88 yerine 80 kullanın
server_name localhost;
root /var/www/public;
index index.php index.html;
# Keep-alive ve connection ayarları (bağlantı birikmesini önlemek için)
keepalive_timeout 65;
keepalive_requests 100;
client_max_body_size 20M;
client_body_timeout 60s;
client_header_timeout 60s;
send_timeout 60s;
# HTTPS için proxy headers
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
# Güvenlik başlıkları
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
# Ana location
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP dosyaları için
location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# HTTPS için ek parametreler
fastcgi_param HTTPS on;
fastcgi_param HTTP_X_FORWARDED_PROTO https;
# Timeout ayarları
fastcgi_read_timeout 300;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 300;
# FastCGI keep-alive ve buffer ayarları (bağlantı birikmesini önlemek için)
fastcgi_keep_conn on;
fastcgi_buffering on;
fastcgi_buffer_size 4k;
fastcgi_buffers 8 4k;
fastcgi_busy_buffers_size 8k;
# Connection pool ayarları
fastcgi_max_temp_file_size 0;
}
# Gizli dosyaları engelle
location ~ /\.ht {
deny all;
}
# Log dosyalarını engelle
location ~ /\.log {
deny all;
}
}