Page 1 of 1

Change URL from domain/mailscanner

Posted: 21 Jan 2019 23:09
by Alleyviper
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 ;)

Re: Change URL from domain/mailscanner

Posted: 02 Dec 2019 16:59
by pdwalker
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?

Re: Change URL from domain/mailscanner

Posted: 09 Dec 2019 15:57
by smyers119
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. .

Re: Change URL from domain/mailscanner

Posted: 10 Dec 2019 15:18
by pdwalker
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.