-
Notifications
You must be signed in to change notification settings - Fork 0
Nginx
d47081 edited this page Feb 13, 2024
·
1 revision
server {
listen 80;
root /home/kvazar/webapp/public;
index index.html index.htm index.nginx-debian.html index.php;
server_name kvazar.ygg kvazar.ygg.at;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_param APP_ENV prod;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
location ~ \.php$ {
return 404;
}
}
server {
listen 80;
server_name _;
location /kvazar {
root /home/kvazar/webapp/public;
rewrite ^/kvazar/(.*)$ /$1 break;
try_files $uri @kvazar;
}
location @kvazar {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /home/kvazar/webapp/public/index.php;
fastcgi_param SCRIPT_NAME /kvazar/index.php;
fastcgi_param REQUEST_URI /kvazar$uri?$args;
# Environment variables
fastcgi_param APP_ENV prod;
}
}