Questions tagged [pattern-matching]
25 questions
0
votes
1 answer
How can I match requests for known mime types containing query strings, in nginx?
I'm using nginx to serve assets statically, and also route all non-asset requests to a PHP front controller. I have a location block that looks like:
location / {
include /etc/nginx/mime.types;
index index.php;
try_files $request_uri…
![](../../users/profiles/263831.webp)
alexw
- 371
- 3
- 12
0
votes
1 answer
Nginx How to set location static files to match with jsessionid
I'm working on Nginx to add cache headers on my static files and works. I'm using this location
location ~* \.(ico|css|js|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control…
![](../../users/profiles/382259.webp)
Vinicius Roberto
- 23
- 5
0
votes
1 answer
Return result only if multiple strings exist in a file
Is there a Linux utility which will return the name of a file only if it contains multiple specified strings? Not necessarily on the same line. Obviously grep can "OR" but I'm looking for "AND".
![](../../users/profiles/366118.webp)
Senior Geek
- 55
- 9
0
votes
2 answers
syslog-ng prepending date to received logs, breaking patterns in patterndb
I'm setting up central logging for our servers using syslog-ng + patterndb, however the logs the logging server is receiving from the client are prepended with the date, host and other data. This of course breaks all the patterns in patterndb so…
![](../../users/profiles/193333.webp)
lsh
- 148
- 1
- 12
0
votes
1 answer
Lighttpd, regex in conf, path including regex match
The background :
- Lighttpd 1.4.28
- Debian 6.0.7 i686
Several developers are using this web server, and each of them has his own virtual host named after "username.mysite.tld". These hosts are working fine, and I'd like to make a generic rule for…
![](../../users/profiles/200112.webp)
Httqm
- 205
- 2
- 8
0
votes
1 answer
match 2 numbers in extensions at asterisks dialplan
is there a simple way to match something like this:
exten => _+380XXXXXXXXX,1,NoOp(hint that)
exten => _0XXXXXXXXX,1,NoOp(hint that)
this two extensions matches same number with or without +38 prefix. is there any rule
to mutch like…
![](../../users/profiles/43316.webp)
MealstroM
- 1,517
- 1
- 16
- 31
0
votes
1 answer
Nginx reverse-proxy pass front-end application matching url from HTTPS to HTTP
I everyone. I'm very new to Nginx. My situation is like this.
I have a Php application which that handles both backend and front-end, and also I have another ReactJs application as a micro-frontend service. I'm using a Docker container for the Nginx…
![](../../users/profiles/958342.webp)
Dananjaya Ariyasena
- 101
- 2
0
votes
1 answer
Finding a string and remove all contents between two delimiters
I have searched and I don't know what I'm doing wrong but I can't find an answer to this question.
I have a file with all text stored as a single line. I am needing to find a pattern and remove all the text before and after that text until…
0
votes
1 answer
Nginx pattern matching to part of path
Here's what I would like to accomplish:
All requests to /api/... should be directed to a reverse proxy
All requests to /static/... should be served from /html/static/pub
All other requests should be served from /html/app/pub OR fall back to…
![](../../users/profiles/534382.webp)
Máté Safranka
- 121
- 1
- 6
-6
votes
1 answer
Using pattern matching to reduce IP Spoofing
The IP Spoofing is becoming a major concern these days.I was wondering whether we could use pattern matching,like comparing the hop count of the packets coming or the TTL(Time To Live) field of the IP datagram to reduce IP spoofing.Is there any way…
![](../../users/profiles/205736.webp)
user1369975
- 99
- 5