File size: 712 Bytes
db82a5e
 
 
 
 
 
 
 
 
 
fb30f35
db82a5e
 
 
 
 
 
4034d34
fb30f35
 
 
 
 
db82a5e
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
server {
    listen 8081;
    server_name _;
    root /app/www/public;
    index index.php index.html;

    access_log /dev/stdout;
    error_log /dev/stderr;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        # Extract original URI (without query string) from REQUEST_URI
        if ($request_uri ~ ^([^?]*)) {
            set $orig_path $1;
        }
        fastcgi_param ORIG_PATH_INFO $orig_path;
    }

    location ~ /\.(ht|env|git) {
        deny all;
    }
}