Page 1 of 1

Redirect /zm alias to server's root

Posted: Tue Oct 01, 2019 10:39 am
by Rajstopy
Dear all,

I've a strange f*รน^! problem I'm struggling with for a while.

When accessing ZoneMinder, I need to put https://myserver.net/zm . I just want to be able to type https://myserver.net. Looks easy but when I change the DocumentRoot to /usr/share/zoneminder/www , I get some strange layout meaning something is not set correctly. What would be the best approach to use my server's root address ?

Cheers,

R.

Re: Redirect /zm alias to server's root

Posted: Wed Oct 02, 2019 11:08 am
by pms
If you wan to login using url https://myserver.net
you can create an "index.php" file in the root redirecting pointing to the zm directory.

index.php content:

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://myserver.net/zm");
header("Connection: close");
?>

Re: Redirect /zm alias to server's root

Posted: Wed Oct 02, 2019 12:01 pm
by Rajstopy
Great !

Will try it asap and let you know.

Many thanks,

R.

Re: Redirect /zm alias to server's root

Posted: Sat Oct 12, 2019 4:16 pm
by kitkat
This worked for me...

Code: Select all

mount --bind /usr/share/zoneminder/www /var/www/html
To make it survive a reboot, do...

Code: Select all

echo "/usr/share/zoneminder/www /var/www/html auto bind,defaults 0 0" >> /etc/fstab
I'm running ZM-1.32.2 on CentOS/Apache so if you're using something different then you may have to alter the paths above.

Re: Redirect /zm alias to server's root

Posted: Mon Oct 14, 2019 6:08 am
by Rajstopy
Hello,

I did install the index.php permanent redirect. It works fine !

Cheers,

R.