<div dir="auto">Please don't use server name like <span style="font-family:sans-serif;font-size:13.696px">.</span><a href="http://armapedia.de/" style="text-decoration-line:none;color:rgb(66,133,244)">armapedia.de</a> you should USe fqdn</div><div class="gmail_extra"><br><div class="gmail_quote">12 авг. 2017 г. 15:58 пользователь "Reinis Rozitis" <<a href="mailto:r@roze.lv">r@roze.lv</a>> написал:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Here, whenever I enter <a href="http://www.armapedia.de" rel="noreferrer" target="_blank">www.armapedia.de</a> in my browser, I am redirected to<br>
> <a href="http://armapedia.3jgkp.de" rel="noreferrer" target="_blank">armapedia.3jgkp.de</a>. I dont understand this behavior at all. All examples about<br>
> nginx and multiple vhosts with different domains just use the appropriate<br>
> server_name entries, so I'm really stuck here.<br>
<br>
First - I would try to upgrade nginx / you are using quite an old (~3 years) version 1.6.2.<br>
<br>
I don't particularly remember at what point but there have been some issues/changes on how nginx handles virtual server priority. At least I've seen a similar issue in serving wrong SSL certificates (as in chosing the wrong virtual server block / SNI not working as expected) which went away after upgrade to a most recent version.<br>
<br>
While it may not be the case here it's a good point to start for a better support.<br>
<br>
<br>
<br>
Looking at the response headers for <a href="http://armapedia.de" rel="noreferrer" target="_blank">armapedia.de</a>:<br>
<br>
Connecting to <a href="http://www.armapedia.de" rel="noreferrer" target="_blank">www.armapedia.de</a> (<a href="http://www.armapedia.de" rel="noreferrer" target="_blank">www.armapedia.de</a>)|88.99.227.<wbr>139|:80... connected.<br>
HTTP request sent, awaiting response...<br>
  HTTP/1.1 301 Moved Permanently<br>
  Server: nginx/1.6.2<br>
  Date: Sat, 12 Aug 2017 12:48:45 GMT<br>
  Content-Type: text/html; charset=UTF-8<br>
  Connection: keep-alive<br>
  Set-Cookie: wsc30_cookieHash=<wbr>3fffeb677df909960a434c5f05d66f<wbr>2007cde491; path=/; domain=<a href="http://armapedia.3jgkp.de" rel="noreferrer" target="_blank">armapedia.3jgkp.de</a>; HttpOnly<br>
  Location: <a href="http://armapedia.3jgkp.de/" rel="noreferrer" target="_blank">http://armapedia.3jgkp.de/</a><br>
<br>
<br>
There is a cookie for <a href="http://armapedia.3jgkp.de" rel="noreferrer" target="_blank">armapedia.3jgkp.de</a> .. which means that the request is actually passed to php (also the redirect could come from php not nginx) which shouldn’t happen with:<br>
    return 301 <a href="https://www.armapedia.de" rel="noreferrer" target="_blank">https://www.armapedia.de</a>$<wbr>request_uri;<br>
<br>
what again indicates that the request is handled by the first server {} block rather than the one you expect.<br>
<br>
rr<br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a></blockquote></div></div>