Welcome! Log In Create A New Profile

Advanced

server section applying where it is not expected to

Posted by w6g 
w6g
server section applying where it is not expected to
January 21, 2016 11:22AM
Hi.

I have set up a server section for a mailman list using

server {
listen xx.xx.xx.xx:80;
server_name lists.example.org;
location = / { rewrite ^ /mailman/listinfo permanent; }
location / { rewrite ^ /mailman$uri; }
}
[...]
}

as I found examples on the web, e.g. https://mywushublog.com/2012/05/mailman-with-nginx-on-freebsd/.

Now, using some other subdomain like http://test.example.org/, the URL gets rewritten to /mailman/listinfo too, and so I suspect that this lists.example.org server section also applies to test.example.org -- which I didn't expect. Of course, the IP address is the same for all these domains and sundomains.

Has one of you guys and gals seen such a behaviour before? Does that ring some kind of bell?

Thanks for your time,
w6g



Edited 1 time(s). Last edit at 01/21/2016 11:25AM by w6g.
w6g
Re: server section applying where it is not expected to
January 21, 2016 12:04PM
Tried to capture the HTTP requests while using Opera. The main parts are -- slightly anonymized --

GET / HTTP/1.15..
Host: test.example.org

followed by

GET /mailman/listinfo HTTP/1.1
Host: test.example.org

which in turn serves the mailman listinfo page. :-/

Full output from
# tcpdump -n -S -s 0 -A 'tcp dst port 80' | grep -B3 -A10 "GET /"

~R.P.A-....GET / HTTP/1.15..
Host: test.example.org
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 OPR/34.0.2036.50
Accept-Encoding: gzip, deflate, lzma, sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4

17:47:47.813655 IP 109.91.37.211.43175 > xx.xx.xx.xx.80: Flags [P.], seq 2939537777:2939538219, ack 226382906, win 16575, length 442
~T:P.@..c..GET /mailman/listinfo HTTP/1.1
Host: test.example.org
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 OPR/34.0.2036.50
Accept-Encoding: gzip, deflate, lzma, sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
w6g
[SOLVED] server section applying where it is not expected to
January 24, 2016 07:24AM
It seems it was a matter of caching, both on the server and client sides. After several tests with querying the server via telnet (and getting the expected results) and deleting browser caches I think it's working now.

w6g
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready