Re: Location for any Host/ Server

2020-06-09 Thread Thomas Ward
I misread what you were trying to achieve thanks to no coffee this morning. > I do not want to include my file into any server directive. You have **no choice** but to specifically include your location snippets where you want them.  Location blocks can't be applied 'globally' unless you have it

Re: Location for any Host/ Server

2020-06-09 Thread basti
Does not work. cat /etc/nginx/conf.d/git.conf ## Disable .htaccess and other hidden files server { listen 80 default_server; server_name _; location ~ /\.git { return 404; } location ~ /\.(?!well-known).* { deny all; access_log off; log_not_found off; } } Result is, th

Re: Location for any Host/ Server

2020-06-09 Thread Thomas Ward
server {     listen 80 default_server;     server_name _;     ... } The above should do what you're after.  Specifies a default-server listener on port 80 and it matches that special catch-all that accepts all server_name results.  (though, default_server will match anything that doesn't match a

Location for any Host/ Server

2020-06-09 Thread basti
Hello, i want to setup a location match for any hostname/servername like in apache: cat /etc/apache2/conf-enabled/git.conf RedirectMatch 404 /\.git In nginx I try cat /etc/nginx/conf.d/git.conf server { ## Disable .htaccess and other hidden files location ~ /\.(?!well-known).* { deny al

Re: Why does nginx strip trailing headers from a proxied backend? How can I prevent it?

2020-06-09 Thread Alan Chandler
On 09/06/2020 02:51, Maxim Dounin wrote: Hello! On Mon, Jun 08, 2020 at 10:29:23PM +0100, Alan Chandler wrote: On 08/06/2020 21:58, Maxim Dounin wrote: On Mon, Jun 08, 2020 at 08:57:56PM +0100, Alan Chandler wrote: I have nginx acting as the static file server for a single page web app I a