So I need to know where to add permanent apache redirects to common URL’s, we’re coming from a cPanel based system to NethServer so some users are still using /webmail on the root domain to get to SOGo and we’d like to keep that a thing.
Right now I have it set up as a 301 redirect using HTACCESS in that main sites root, but we’d like the redirect to be done on a httpd level, as htaccess could be modified via ftp and could cause additional problems. Where do we add the redirect configuration for that URL, because it appears that when making changes to the virtualhost through the GUI, the virtualhosts.conf file is automatically updated, and erases any changes.
We want this done only for the one domain. Is there a way to do it so that in the template for this domain it will automatically just keep those in there? Anyone have experience with this on NethServer?
It’s not SOGo I’m looking to change. it’s one of the Virtual Hosts under the web server module. I need to add some redirects that redirect to things like our AutoConfig setup, webmail, and a few events we normally hold.
Reverse proxy creates the redirects on all configured domains doesn’t it? We only want the one main domain name, which is already listed on the virtual hosts for the web server module.
Yes but as soon as I make that change in the .conf file, it will erase it when any change is made via the GUI won’t it? That’s what I’m trying to avoid.
NS read vars from e-smith database and write configuration files with e-smith template. You have to write a custom template if you want to avoid this or drop your apache configuration in another filr.You should read the documentation I gave
That was regarding the configuration and directly changing the file, not using proxypass in the GUI. I tried Reverse Proxy in the GUI and all it’s doing is adding “SOGO” to the URL. My assumption is that it is getting that from mail.domain.com, as that is where SOGo is located, which is what I’m trying to redirect domain.com/webmail to.
I don’t believe that reverse proxy is what I’m looking for, as I’m just looking for a simple URL redirect that is hardcoded into the configuration. The Web Server module needs a place for each virtual host where you can add custom configuration for each host. I think that would solve my issue.
Here’s an example of the same thing I’m trying to accomplish but pulled from a non-Nethserver server. I have this setup with a separate domain name, setup pointing somewhere completely different.
Using the example above, I need a way to add the Apache directive REDIRECT to the VHOST for domain.com, and have that stay there regardless of GUI modification.
Additionally, I’ve done more testing, the Reverse Proxy doesn’t redirect, it simply creates a rewrite to the URL presented at that URL, which is not what I’m attempting to accomplish. I only want this to be done on the one Apache VHOST, not globally for any subdomain or root domain we configure.
Well you have to create a custom template with a condition to be enabled by the name of the vhosts. You must know esmith template engine and some basic perl condition
The easier is to drop your apache configuration directly in /etc/httpd/conf.d/
What you are requesting is not implemented inside the vhost UI, if you want so it is a feature request you need to do