Apache yerine Nginx kullanıyorsan aşağıdaki yapılandırmayı kullan:
server {
listen 80;
server_name domain.com;
root /var/www/onox/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .php$ {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.(env|git|htaccess) {
deny all;
}
}
SSL ile HTTPS
Let's Encrypt ile ücretsiz SSL:
certbot --nginx -d domain.com
PHP-FPM Ayarları
pm.max_children = 10, memory_limit = 256M, upload_max_filesize = 64M önerilir.