mirror of
https://github.com/simonmicro/Pritunl-Fake-API.git
synced 2025-12-06 11:07:01 -05:00
* Moved files around for better consistency * Simplified docker file for use * Added a arg to the server/setup.py script for more flexibility * Improved the current docker build and compose for the fully patched pritunl.
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
# Pritunl Fake API Server definition
|
|
server {
|
|
listen [::]:80 default_server;
|
|
listen 80 default_server;
|
|
server_name _;
|
|
|
|
sendfile off;
|
|
tcp_nodelay on;
|
|
absolute_redirect off;
|
|
|
|
root /var/www/html;
|
|
index index.php index.html;
|
|
|
|
location / {
|
|
# First attempt to serve request as file, then
|
|
# as directory, then fall back to index.php
|
|
try_files $uri $uri/ /index.php?path=$uri&$args;
|
|
}
|
|
|
|
# Pass the PHP scripts to PHP-FPM listening on php-fpm.sock
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/run/php-fpm.sock;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
fastcgi_index index.php;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
|
|
expires 5d;
|
|
}
|
|
|
|
# Deny access to . files, for security
|
|
location ~ /\. {
|
|
log_not_found off;
|
|
deny all;
|
|
}
|
|
} |