jacobwb / hashover-next

This branch will be HashOver 2.0
GNU Affero General Public License v3.0
420 stars 87 forks source link

Hashover directory place in location different DocumentRoot #251

Closed ngtrian closed 5 years ago

ngtrian commented 5 years ago

I has config vhost (apache) my website:

ServerName mywebsite.com
DocumentRoot /var/www/mywebsite
Alias /hashover /var/www/hashover

I embed code to mywebsite.com <script type="text/javascript" src="/hashover/comments.php"></script>

Result is "HashOver: Could not get HTTP root, please configure manually"

Can you make root position compatible with alias direction in Apache?

ngtrian commented 5 years ago

I made a temporary fix by editing the /hashover/backend/classes/settings.php file

Change line: $root_position = mb_strlen (realpath ($_SERVER['DOCUMENT_ROOT'])); with: $root_position = mb_strlen (dirname ($root_directory));