coder-templates/configs/fox-api/nginx/sites-available/fox-api.conf

30 lines
No EOL
698 B
Text

server {
listen 80;
listen [::]:80;
set $base /home/coder/fox-api;
root $base/public;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/access.log combined buffer=512k flush=1m;
error_log /var/log/nginx/error.log warn;
# index.php
index index.php;
# index.php fallback
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# additional config
include nginxconfig.io/general.conf;
# handle .php
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
include nginxconfig.io/php_fastcgi.conf;
}
}