* Removed unecesery home page * Added PHP Api that provides auth and replaces the json-server for data storage * Added support for alternate geocode-api * Added registration page
55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name devsrv.tld;
|
|
|
|
#beginConf
|
|
|
|
index index.php index.html;
|
|
root /<Path to WorldWise hosting folder>;
|
|
gzip on;
|
|
gzip_proxied any;
|
|
gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript image/svg image/svg+xml application/xml image/x-icon;
|
|
gzip_comp_level 2;
|
|
gzip_disable "msie6";
|
|
gzip_buffers 16 8k;
|
|
|
|
|
|
location / {
|
|
root /<Path to WorldWise hosting folder>/dist;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
try_files $uri $uri/ /api/index.php$is_args$query_string;
|
|
}
|
|
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
|
|
|
|
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
# Check that the PHP script exists before passing it
|
|
try_files $fastcgi_script_name =404;
|
|
|
|
# Bypass the fact that try_files resets $fastcgi_path_info
|
|
# see: http://trac.nginx.org/nginx/ticket/321
|
|
set $path_info $fastcgi_path_info;
|
|
fastcgi_param PATH_INFO $path_info;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi.conf;
|
|
|
|
# Get request file name
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
#endConf
|
|
}
|