aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/docker/nginx/default.conf
blob: 8ae7bb82021db40340810fb1a90df7d686810212 (plain) (blame)
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
server {
    listen 80;
    root /app/public;
    server_name "";
    
    access_log /app/app/logs/nginx-access.log;

    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;

    location = /index.php {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_keep_conn on;
        fastcgi_pass   php:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
    location ~* \.(png|gif|jpg|jpeg|ico|css|js|woff|ttf|otf|woff2|eot)$ {
        include /etc/nginx/mime.types;
        expires max;
        try_files $uri /index.php?$query_string;
    }
    location / {
        index index.php;
        try_files $uri /index.php?$query_string;
    }
}