progval / Limnoria

A robust, full-featured, and user/programmer-friendly Python IRC bot, with many existing plugins.
https://docs.limnoria.net/
Other
619 stars 172 forks source link

Limnoria doesn't handle titles when domain is CNAME #870

Closed Mikaela closed 10 years ago

Mikaela commented 10 years ago
2014-10-12 18:17:10+0300 < Mikaela> web title http://paste.mikaela.info
2014-10-12 18:17:11+0300 < Limnoria> Welcome to nginx!
2014-10-12 18:17:15+0300 < Mikaela> web title http://gallery.mikaela.info
2014-10-12 18:17:16+0300 < Limnoria> Welcome to nginx!
2014-10-12 18:17:27+0300 < Mikaela> web title http://helpdesk.mikaela.info
2014-10-12 18:17:28+0300 < Limnoria> Welcome to nginx!
2014-10-12 18:18:09+0300 < Mikaela> web title http://diral.mikaela.info
2014-10-12 18:18:09+0300 < Limnoria> Welcome to nginx!

Correct titles:

The three first are CNAMEs to the last which really has Welcome to nginx!.

paste.mikaela.info is an alias for diral.mikaela.info.
diral.mikaela.info has address 178.62.20.26
diral.mikaela.info has IPv6 address 2a03:b0c0:1:d0::168:6001
gallery.mikaela.info is an alias for diral.mikaela.info.
diral.mikaela.info has address 178.62.20.26
diral.mikaela.info has IPv6 address ::1
helpdesk.mikaela.info is an alias for diral.mikaela.info.
diral.mikaela.info has address 178.62.20.26
diral.mikaela.info has IPv6 address 2a03:b0c0:1:d0::168:6001
diral.mikaela.info has address 178.62.20.26
diral.mikaela.info has IPv6 address 2a03:b0c0:1:d0::168:6001
jlu5 commented 10 years ago

It seems like Limnoria isn't sending the right HTTP host header to the web server; this is what allows you to have multiple websites on one server.

edit: never mind, see below

progval commented 10 years ago

I get nginx's webpage from my web browser too.

progval commented 10 years ago
progval@Hydrogen:~$ curl -4 paste.mikaela.info | grep title
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4721    0  4721    0     0   134k      0 --:--:-- --:--:-- --:--:--  135k
<title>ZeroBin</title>
    <h1 title="ZeroBin" onclick="window.location.href=scriptLocation();return false;">ZeroBin</h1><br>
progval@Hydrogen:~$ curl -6 paste.mikaela.info | grep title
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   612  100   612    0     0  18215      0 --:--:-- --:--:-- --:--:-- 18545
<title>Welcome to nginx!</title>
Mikaela commented 10 years ago

For future reference the issue was in nginx config, http://serverfault.com/q/277653 .

vhosts should also have the lines

listen 80;
listen [::]:80;

and the default lines which are

listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

aren't enough for vhosts.