Mercurial > Pritunl-Fake-API
comparison docker/api-only/conf.d/pritunl-fake-api.conf @ 0:b51518614818 default tip
New Files
author | Pluto <meokcin@gmail.com> |
---|---|
date | Tue, 03 Sep 2024 15:57:25 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b51518614818 |
---|---|
1 # Pritunl Fake API Server definition | |
2 server { | |
3 listen [::]:80 default_server; | |
4 listen 80 default_server; | |
5 server_name _; | |
6 | |
7 sendfile off; | |
8 tcp_nodelay on; | |
9 absolute_redirect off; | |
10 | |
11 root /var/www/html; | |
12 index index.php index.html; | |
13 | |
14 location / { | |
15 # First attempt to serve request as file, then | |
16 # as directory, then fall back to index.php | |
17 try_files $uri $uri/ /index.php?path=$uri&$args; | |
18 } | |
19 | |
20 # Pass the PHP scripts to PHP-FPM listening on php-fpm.sock | |
21 location ~ \.php$ { | |
22 try_files $uri =404; | |
23 fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
24 fastcgi_pass unix:/run/php-fpm.sock; | |
25 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
26 fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
27 fastcgi_index index.php; | |
28 include fastcgi_params; | |
29 } | |
30 | |
31 location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { | |
32 expires 5d; | |
33 } | |
34 | |
35 # Deny access to . files, for security | |
36 location ~ /\. { | |
37 log_not_found off; | |
38 deny all; | |
39 } | |
40 } |