Change URL from domain/mailscanner

Questions and answers about how to do stuff
Post Reply
Alleyviper
Posts: 74
Joined: 16 Oct 2018 05:55
Location: Portugal

Change URL from domain/mailscanner

Post by Alleyviper » 21 Jan 2019 23:09

Hi there,

Is there a secure way of changing apache folder?

From

Code: Select all

https://mx.domain.tld/mailscanner/
To

Code: Select all

https://mx.domain.tld/panel/
This is just an example. Changing this without damaging EFA of course ;)

User avatar
pdwalker
Posts: 1185
Joined: 18 Mar 2015 09:16

Re: Change URL from domain/mailscanner

Post by pdwalker » 02 Dec 2019 16:59

It is possible, but I believe that there are quite a number of places where the /mailscanner/ path is hardcoded.

Changing the path is easy, but some things might break until you find every instance of every place where /mailscanner/ is referenced.

I vaguely recall a discussion on this somewhere in the forums, but I am unable to find it. I might be imagining it.

From memory (so my instructions may not be correct as I am not spending a lot of time on this):

The very simplest way would be to change your apache configuration to follow symbolic links. Uou could symlink your /var/www/html/mailscanner directory to /var/www/html/panel. That should allow the /panel/ path to work, and allow EFA to continue to function, but you will still end up with /mailscanner reference urls in different places. You'd have to track them all down one by one until you get what you want.

Also, upgrades might be unhappy.

If you were just to rename the /var/www/html/mailscanner directory to /var/www/html/panel then you'll get immediate feedback on what breaks.

Why do you wish to do this?

smyers119
Posts: 4
Joined: 29 Nov 2019 11:36

Re: Change URL from domain/mailscanner

Post by smyers119 » 09 Dec 2019 15:57

If domain/mailscanner is set up as a Virtual Host in apache then this would be as easy as using the ServerAlias variable or a simple rewrite rule. No code changes required. When I have time to look into this further I'll try to be more help. But until then, Googing examples of the above should lead you on the right path. .

User avatar
pdwalker
Posts: 1185
Joined: 18 Mar 2015 09:16

Re: Change URL from domain/mailscanner

Post by pdwalker » 10 Dec 2019 15:18

Yes. That would work, and would be a better fix than my suggestion.

Just goes to show how much I *don't* use the apache rewrite rules.

Post Reply