Redirect /zm alias to server's root

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
Rajstopy
Posts: 8
Joined: Fri Sep 13, 2019 3:52 pm

Redirect /zm alias to server's root

Post by Rajstopy » Tue Oct 01, 2019 10:39 am

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.

pms
Posts: 9
Joined: Sat Aug 24, 2019 3:59 pm
Contact:

Re: Redirect /zm alias to server's root

Post by pms » Wed Oct 02, 2019 11:08 am

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");
?>

Rajstopy
Posts: 8
Joined: Fri Sep 13, 2019 3:52 pm

Re: Redirect /zm alias to server's root

Post by Rajstopy » Wed Oct 02, 2019 12:01 pm

Great !

Will try it asap and let you know.

Many thanks,

R.

kitkat
Posts: 88
Joined: Sun Jan 27, 2019 5:17 pm

Re: Redirect /zm alias to server's root

Post by kitkat » Sat Oct 12, 2019 4:16 pm

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.

Rajstopy
Posts: 8
Joined: Fri Sep 13, 2019 3:52 pm

Re: Redirect /zm alias to server's root

Post by Rajstopy » Mon Oct 14, 2019 6:08 am

Hello,

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

Cheers,

R.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests