diff options
author | punk <punk@libernaut> | 2021-04-29 16:11:04 +0100 |
---|---|---|
committer | punk <punk@libernaut> | 2021-04-29 16:11:25 +0100 |
commit | 9bef2e2b7ea351b6b1cb490597356677db61ff34 (patch) | |
tree | c36ae24aa3c36f6c19284c7d4da7c25a620bfabf /linux/conf/nginx/sites-enabled/frontpage.conf | |
parent | 6b5cf63d1987889e272643bf7eeb7725df856d11 (diff) | |
parent | 5e601f7ee14830ef645ee3d3b1bcdce7450a5ce3 (diff) | |
download | doc-master.tar.gz |
Diffstat (limited to 'linux/conf/nginx/sites-enabled/frontpage.conf')
-rw-r--r-- | linux/conf/nginx/sites-enabled/frontpage.conf | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/linux/conf/nginx/sites-enabled/frontpage.conf b/linux/conf/nginx/sites-enabled/frontpage.conf new file mode 100644 index 0000000..7f7e66a --- /dev/null +++ b/linux/conf/nginx/sites-enabled/frontpage.conf @@ -0,0 +1,40 @@ +server { + listen 8080; + server_name frontpage.server.ank; + + #access_log syslog:server=unix:/dev/log,facility=daemon,tag=nginx_frontpage,nohostname main; + error_log syslog:server=unix:/dev/log,facility=daemon,tag=nginx_frontpage_err,nohostname debug; + + root /srv/www/frontpage; + + index index.html index.php; + + location / { + index index.html; + try_files $uri $uri/ index.html index.php$is_args$args; + } + + location ~ [^/]\.php(/|$) { + + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + + # Mitigate https://httpoxy.org/ vulnerabilities + fastcgi_param HTTP_PROXY ""; + + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + + # include the fastcgi_param setting + include fastcgi_params; + + # SCRIPT_FILENAME parameter is used for PHP FPM determining + # the script name. If it is not set in fastcgi_params file, + # i.e. /etc/nginx/fastcgi_params or in the parent contexts, + # please comment off following line + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + } +} |