I have been pulling my hair out on this one.
I created a site and added domain aliases
I then chose to redirect to a domain.

Whenever I went to mysite http://mysite:80 it would redirect to http://mysite which is great

but when I used nodejs, I would get the header

 uri: 'http://mysite:80/nodejs/message',

...
 { 'Content-Length': 352,
     'Content-Type': 'application/x-www-form-urlencoded' } }
Failed to parse authentication message: [SyntaxError: Unexpected token <]
Failed message string: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://mysite/nodejs/message">here</a>.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at sfethnicstudies.org Port 80</address>
</body></html>

I am not sure if this is a message that I can supress or not? Or if it is an issue with other modules which don't handle 301 redirects correctly

Comments

SocialNicheGuru’s picture

Related comment:

2) issue with '301 Moved Permanently' can be when you have wrong settings in virtualhost

from https://www.drupal.org/node/2305583#comment-8980201

SocialNicheGuru’s picture

Issue tags: +aegir, +provision, +hostmaster