Sentora Support Forums
wildcard subdomain - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: wildcard subdomain (/showthread.php?tid=2510)



wildcard subdomain - Delbane - 01-19-2016

Hi guys i'm using sentora and i'm happy with its current state, i just have one question, I created a cname in my dsn (not in sentora i manage my dns externally) with a wildcard pointing to my webserver, the problem is that it always goes to the sentora login page instead of on my actual website

I basically need *.mydomain.com to always go to my website instead of the sendora panel, Is that possible ? Is there a quick way to do this ?

edit : I saw the question here : http://forums.sentora.org/showthread.php?tid=302 but there doesn't seem to be an answer, can we apply a workaround or something ?

Thanks


RE: wildcard subdomain - Delbane - 01-19-2016

(01-19-2016, 01:19 PM)Delbane Wrote: Hi guys i'm using sentora and i'm happy with its current state, i just have one question, I created a cname in my dsn (not in sentora i manage my dns externally) with a wildcard pointing to my webserver, the problem is that it always goes to the sentora login page instead of on my actual website

I basically need *.mydomain.com to always go to my website instead of the sendora panel, Is that possible ? Is there a quick way to do this ?

edit : I saw the question here : http://forums.sentora.org/showthread.php?tid=302 but there doesn't seem to be an answer, can we apply a workaround or something ?

Thanks

I managed to do it from the backend directly, what I did is i created wildcard.domain.com and then in the vhost config located here /etc/sentora/configs/apache/httpd-vhosts.conf I added the line
ServerAlias=*.domain.com


RE: wildcard subdomain - TGates - 01-19-2016

(01-19-2016, 01:35 PM)Delbane Wrote: HiI managed to do it from the backend directly, what I did is i created wildcard.domain.com and then in the vhost config located here /etc/sentora/configs/apache/httpd-vhosts.conf I added the line
ServerAlias=*.domain.com
That will not work for too long since the daemon will over write that file when it runs.
You can try it as a custom vhost entry > Module Admin > Apache Config > Override a Virtual Host > [Select domain] > and enter it in the 'Custom Entry' text box > Save and wait ~5mins for the daemon to run.


RE: wildcard subdomain - Delbane - 01-19-2016

(01-19-2016, 02:11 PM)TGates Wrote:
(01-19-2016, 01:35 PM)Delbane Wrote: HiI managed to do it from the backend directly, what I did is i created wildcard.domain.com and then in the vhost config located here /etc/sentora/configs/apache/httpd-vhosts.conf I added the line
ServerAlias=*.domain.com
That will not work for too long since the daemon will over write that file when it runs.
You can try it as a custom vhost entry > Module Admin > Apache Config > Override a Virtual Host > [Select domain] > and enter it in the 'Custom Entry' text box > Save and wait ~5mins for the daemon to run.

to confirm, it would be as following?
http://imgur.com/djbaKm5


RE: wildcard subdomain - TGates - 01-19-2016

Yes. If it fails you can manually edit the httpd-vhosts.conf and remove that line and restart apache, then log in and remove the entry.


RE: wildcard subdomain - Delbane - 01-19-2016

(01-19-2016, 02:29 PM)TGates Wrote: Yes. If it fails you can manually edit the httpd-vhosts.conf and remove that line and restart apache, then log in and remove the entry.

Thank you so much, this topic can be closed ! Big Grin


RE: wildcard subdomain - sakora - 03-22-2016

TGates, how would you set this for every vhost in the config?

I'm in the apache admin module, and I see the field it's supposed to be in.

I guess my question is, is how would you write ServerAlias=*.domain.com to be domain agnostic in Sentora?


RE: wildcard subdomain - TGates - 04-22-2016

Just saw this post Sad

You couldn't without actually re-writing the core code for the apache_admin module.