redirect with alias

#1
So, the customer has a domain domain1.com, hosting on server A. The domain1.com is redirecting 301 to domain2.com, running on server B.

When I was running nginx apache, alias such as domain1.com/webmail was working fine. It's just directed to the real URL domain1.com/roundcube
When I converted to OLS, the domain1.com/webmail is no longer working. Any domain1.com/alias-here is redirecting to domain2.com/alias-here

Did I miss any setting for keeping alias running on server A, not redirect to server B?
Thank you.
 

Cold-Egg

Administrator
#2
So you want to redirect everything under domain1.com to domain2.com including the root domain, but webmail, is that correct?
Please try to set a static context for webmail on server A and see if it works.
 
#3
Thanks for answering. I am using OLS with DirectAdmin, so it's entering to the Read-only mode in web admin. And there is not virtual hosts config in web-admin. Is there any guide for editing in SSH?

For alias configuration, I currently have this in /usr/local/lsws/conf/httpd-alias.conf
Code:
context /webmail/ {
                location                /var/www/html/roundcube/
                include /usr/local/lsws/conf/httpd-webapps-php.conf
        }
And content of the file /usr/local/lsws/conf/httpd-webapps-php.conf is
Code:
  allowBrowse 1
  addMIMEType             application/x-httpd-lsphpwebapps php
  addDefaultCharset      off
  phpIniOverride  {
    php_admin_value open_basedir ""
    php_admin_value session.save_path "/var/www/tmp"
    php_admin_value upload_tmp_dir "/var/www/tmp"
  }
  rewrite  {
    enable                  1
    autoLoadHtaccess        1
  }
Where should I configure static context for webmail alias, so it would apply to all the domains on the server, please?
Thank you.
 
Top