How to set up alias with Ubuntu + nginx

Hello,

I have main virtual server: prohormony.sk and I want to add kind of aliases - prohormones.hu and prohormones.ro

I want these 2 domains to have the same root as prohormony.sk, we have set it up but when I open them I get No input file specified.

When we set it up as aliases we get redirected to prohormony.sk because of redirects set at prohormony.sk config to redirect everything to https://

Also we were told we can only have 1 server block in config so we cannot separate them.

Status: 
Active

Comments

Well the website will be running at https:// so users will be redirected to non-www version and I want to load the content of prohormony.sk kind of masked alias

If user goes to prohormones.hu I want to load the same content as prohormony.sk

right ... but if the user goes to prohormones.hu and is redirected to SSL, do you still want the URL to show prohormones.hu ?

Unfortunately that's not something we support currently (because it isn't trivial to implement in Apache)

so there isnt any way we can set this up? Even with multiple server blocks ?

Currently, no - however, this is a pretty good feature request, so I will look into adding support for it.

well cant we even support something like this:

create separate domain prohormones.hu set root directory the same as prohormony.sk in php I will check the domains and redirects?

Sure, that could be done, and that's likely how it will be implemented. However, there is much complexity in Virtualmin when creating new domains that has to be handled.

hm so u think now its impossible to set up ?