11
submitted 4 months ago* (last edited 4 months ago) by Rick_C137@programming.dev to c/webdev@programming.dev

Hi,

I have this rule in my nginx config file

	location ~* \/(fileA.txt|fileB.txt)$ {
		return 404 'nothing here';
	}

but it's not working

but

	location /fileA.txt {
		return 404 'nothing here';
	}

~~is working....~~

Any idea what's wrong ?

Thanks.

you are viewing a single comment's thread
view the rest of the comments
[-] Rick_C137@programming.dev 2 points 4 months ago* (last edited 4 months ago)

~~Never mind, I understood my mistake... This nginx built didn't come with ngx_http_rewrite_module so return will not works.~~

[-] Rick_C137@programming.dev 1 points 4 months ago

Apparently ngx_http_rewrite_module "module" is installedby default with nginx... damn thay should use diffrent terms for what could be install or not at compile time..

this post was submitted on 14 Aug 2025
11 points (100.0% liked)

Web Development

4923 readers
1 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS