Delete nginx template, use nixpacks_php_fallback_path instead
This commit is contained in:
parent
e157d58847
commit
dabab56245
@ -1,67 +0,0 @@
|
|||||||
worker_processes 5;
|
|
||||||
daemon off;
|
|
||||||
|
|
||||||
worker_rlimit_nofile 8192;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 4096; # Default: 1024
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
include $!{nginx}/conf/mime.types;
|
|
||||||
index index.html index.htm index.php;
|
|
||||||
|
|
||||||
default_type application/octet-stream;
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] $status '
|
|
||||||
'"$request" $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
access_log /dev/stdout;
|
|
||||||
error_log /dev/stdout;
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
server_names_hash_bucket_size 128; # this seems to be required for some vhosts
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen ${PORT};
|
|
||||||
listen [::]:${PORT};
|
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
root /app/;
|
|
||||||
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
|
||||||
add_header X-Content-Type-Options "nosniff";
|
|
||||||
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
charset utf-8;
|
|
||||||
|
|
||||||
location = /favicon.ico { access_log off; log_not_found off; }
|
|
||||||
location = /robots.txt { access_log off; log_not_found off; }
|
|
||||||
|
|
||||||
location ^~ /bin/ {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
location ~ /vendor/.*\.php$ {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
# This is cool because no php is touched for static content.
|
|
||||||
# include the "?$args" part so non-default permalinks doesn't break when using query string
|
|
||||||
try_files $uri $uri/ /index.php?$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
fastcgi_pass 127.0.0.1:9000;
|
|
||||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
||||||
include $!{nginx}/conf/fastcgi_params;
|
|
||||||
include $!{nginx}/conf/fastcgi.conf;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ /\.(?!well-known).* {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
2
nixpacks.toml
Normal file
2
nixpacks.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[variables]
|
||||||
|
NIXPACKS_PHP_FALLBACK_PATH = "/index.php"
|
Loading…
Reference in New Issue
Block a user