shirosaidev / diskover-web

Web file manager, disk space usage, storage search engine and file system analytics for diskover
https://www.diskoverdata.com
Apache License 2.0
121 stars 37 forks source link

run in virtualhost #24

Closed renarios closed 5 years ago

renarios commented 5 years ago

Hi, when I run diskover-web with php -S :8000 the dashboard works fine, but when I run it in a virtualhost, it gives all kind of errors, like: 00, 'query' => [ 'match' => [ 'state' => 'running' ] ] ]; $queryResponse = $client->search($searchParams); $totalcrawls = $queryRespo...

Here's my virtualhost:

<VirtualHost *:8000>
  DocumentRoot /usr/share/diskover-web/public
  ErrorLog ${APACHE_LOG_DIR}/error-diskover-web.log
  CustomLog ${APACHE_LOG_DIR}/access-diskover-web.log combined
  DirectoryIndex index.php

  alias /src "/usr/share/diskover-web/src"
  alias /vendor "/usr/share/diskover-web/vendor"

  <Directory "/usr/share/diskover-web/public/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
  </Directory>
  <Directory "/usr/share/diskover-web/src/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
  </Directory>
  <Directory "/usr/share/diskover-web/vendor/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
  </Directory>
</VirtualHost>

What can I do to make diskover-web work in apache2?

Cheers, Rene

shirosaidev commented 5 years ago

what errors in apache logs are you seeing? Is php7 and php-fpm (fastcgi) set up correct for apache?

damburgey commented 5 years ago

Is that running inside your main httpd.conf? Might be easier to just check your httpd.conf file has

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

And if so, create a diskover-web.conf file in /etc/httpd/conf/ with something simple for testing like:

Listen 8000
<VirtualHost *:8000>
        ServerName diskover-web
        ServerAlias diskover-web
        DocumentRoot "/path/to/diskover-web/public"
</VirtualHost>

If its file permission related, add your user to the apache group Change ownership recursively of everything in your /path/to/diskover-web/public folder Also make sure the apache group has access to all required files in /path/to/diskover-web/public

sudo usermod -a -G apache <yourusername>
sudo chown -R <yourusername>:apache /path/to/diskover-web/public
sudo chmod 2775 /path/to/diskover-web/public && find /path/to/diskover-web/public -type d -exec sudo chmod 2775 {} \;
find /path/to/diskover-web/public -type f -exec sudo chmod 0664 {} \;
renarios commented 5 years ago

It turned out that libapache2-mod-php was not installed properly. Reinstalling this mod was the solution

Thanks for your support!