Strange redirect /server alias problem returns

It doesn’t also have a port 80 VirtualHost? It should, and we saw them above in your grep output.

Both have. (that is main site and the alias). In the alias it only has:

What makes that an “alias”? That’s a VirtualHost. An alias in Apache is just a “ServerAlias” entry in another VirtualHost.

I think I don’t know what you’re trying to accomplish here, because this doesn’t make sense.

But, also this one clearly has a redirect configured (this is, I assume, the 301 you’re seeing).

Again. I didn’t mess with the hosts file, they were created by virtualmin, the only modification I made was to replace the * with the IP for :80.
I have setup Viartualmin in may, this domain seemed to worked as expected a while. Although I didn’t change a thing, the other day I discovered that alias isn’t working anymore, so I started debugging as is posted above.
So, Joe’s las post put me in the right direction. I have deleted hosts file for the alias and put ServerAlias domainalias.ro in the main host and now it works. So my guess is that the problem was that somehow the aliasdomain host file was created which caused all the mess. But as Shaggy said, it wasn’t me :slight_smile:
Thanks for the help.

Oh, you’ve configured Virtualmin to do that (and probably shouldn’t). I didn’t even know it was an option, as it rarely makes sense to do it hat way.

Actually yes :frowning:

Everything works if you let it.

That’s an excellent piece of wisdom :slight_smile: