[Users] alias to user and admin portal

Juan Hernandez jhernand at redhat.com
Fri May 10 05:46:45 EDT 2013


On 05/07/2013 10:40 AM, Andrej Bagon wrote:
> Hi,
>
> what is the best practice to make a hostname alias for user and admin
> web portal?
> By default the admin portal is on
> hostname/webadmin/webadmin/WebAdmin.html and user portal on
> hostname/UserPortal/org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html
>
> what are the best directives (apache) to run the applications on
> adminportal.hostname and userportal.hostname?
>
> Thank you.
>
> Best Regards,
> Andrej

If you want something simple you can enable virtual hosts in the 
/etc/httpd/conf/httpd.conf file adding the following directive:

NameVirtualHost *:80

Then you can create three virtual hosts, one to preserve the default 
behaviour, one for the userportal and one for webadmin, for example 
creating /etc/httpd/conf.d/00-default-vhost.conf, 
/etc/httpd/conf.d/01-userportal-vhost.conf and 
/etc/httpd/conf.d/02-webadmin-vhost.conf with the following content:

# 00-default-vhost.conf
<VirtualHost *:80>
   ServerName hostname
</VirtualHost>

# 01-userportal-vhost.conf
<VirtualHost *:80>
   ServerName webadmin.hostname
   RewriteEngine on
   RewriteRule / https://r6.example.com/webadmin/webadmin/WebAdmin.html 
[redirect]
</VirtualHost>

# 02-webadmin-vhost.conf
<VirtualHost *:80>
   ServerName userportal.hostname
   RewriteEngine on
   RewriteRule / 
https://hostname/UserPortal/org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html 
[redirect]
</VirtualHost>

-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.


More information about the Users mailing list