Closed yarikoptic closed 10 years ago
Humm, that's not about the CNAME since:
$ dig www.neurostars.org
; <<>> DiG 9.8.3-P1 <<>> www.neurostars.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20379
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.neurostars.org. IN A
;; ANSWER SECTION:
www.neurostars.org. 866 IN CNAME neurostars.org.
neurostars.org. 866 IN A 54.228.95.19
It's just bad subdomain routing in nginx, thanks for the catch!
right -- sure it wasnt' CNAME ;) but it still (again) doesn't work:
$> wget http://www.neurostars.org/
--2014-01-13 01:44:02-- http://www.neurostars.org/
Resolving www.neurostars.org (www.neurostars.org)... 54.228.95.19
Connecting to www.neurostars.org (www.neurostars.org)|54.228.95.19|:80... connected.
HTTP request sent, awaiting response... 400 BAD REQUEST
2014-01-13 01:44:03 ERROR 400: BAD REQUEST.
Hehe, indeed, I just fixed it, thanks for reporting! :+1:
server {
server_name www.neurostars.org;
rewrite ^(.*) http://neurostars.org$1 permanent;
}
atm would lead to Bad Request (400)