0

Raspian 10 (Buster)
Apache 2.4.38
lighttpd 1.4.53

I previously installed lighttpd and it was/is running w/out issue. Today I installed apache so I can run ownCloud. I went through the installation process without issue for apache, owncloud, and the owncloud dependencies. After the initial install I was able to access the owncloud admin setup page at the via 192.168.1.10/owncloud (/var/www/html/owncloud) but I ran into PHP errors. I realized that lighttpd was using port 80 on 127.0.0.1 loopback and was preventing apache from loading properly. So I switched lighttpd to port 8080. After restarting the service it happily went about it's business. I restarted apache at which point I am not able to access any files via apache on 80.

Not Found. The requested URL was not found on this server. Apache/2.4.38 (Raspbian) Server at 192.168.1.10 Port 80

I run checks on apache to make sure it is configured correctly.

systemctl status apache2 which comes up good and apache2ctl -t which returns OK. so everything looks good. So I change apache log reporting to debug and look at the log files:

Access log:

192.168.1.20 - - [05/May/2020:18:38:35 -0900] "GET /index.php HTTP/1.1" 404 496 "http://192.168.1.10/"

Error log:

[Tue May 05 18:38:35.852298 2020] [core:info] [pid 703:tid 2882475040] [client 192.168.1.20:55977] AH00128: File does not exist: /var/www/owncloud/index.php, referer: http://192.168.1.10/

Still nothing obvious. I rebooted. It doesn't load I'm alive! at the doc root either. I've looked through the all the apache config files but I can't see anything and I've read through numerous searches. I know this is a simple issue but can't figure it out.

I know I am overlooking something basc but for the life of me I can't spot it. Any help appreciated!

Edit: Output from tail:

#</Directory>

# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>

#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
15
  • stat /var/www/owncloud/index.php, stat /var/www/owncloud/. should be www-data both. Do you have apparmor on your install?
    – geoai777
    Commented May 6, 2020 at 5:56
  • stat returns for both: Access: (0755/drwxr-xr-x) Uid: ( 33/www-data) Gid: ( 33/www-data).No AppArmor. Not familiar. Tx for the input.
    – rodph
    Commented May 6, 2020 at 6:16
  • Does owncloud include an apparmor profile?
    – rodph
    Commented May 6, 2020 at 6:42
  • ls /etc/apparmor.d/ should show all available profiles. Also the this problem may be in HTML referencing a broken link to an image, css, js file, so that when the browser receives HTML and gets these resources Apache can't find them and prints the "File Does Not Exist" error. Check rootpath configuration
    – geoai777
    Commented May 6, 2020 at 7:41
  • I still can't solve this. Additional steps I have tried: 1. Checked DocumentRoot in /etc/apache2/sites-enabled/000-default.conf. It is set to /var/www/html and nothing so I tried changing it to /var/www but still nothing. 2. I made www-data owner of ../html and ../vww directories and set permissions to 775. Uninstalled and reinstalled apache and owncloud dependencies. Nothing. I am restarting apache between changes and have done several reboots for good measure. Can anyone point me in the right direction? I know this is something simple. What am I missing!
    – rodph
    Commented May 6, 2020 at 18:01

3 Answers 3

0

Here is what my vhost file looks like:

<VirtualHost *:80>

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <Directory /var/www/html>
              Options Indexes FollowSymLinks
              AllowOverride All
              Order allow,deny
              Require all granted
        </Directory>

</VirtualHost>
0

I solved this. Not sure what the issue was but it was something very basic, either in the config files or with ownership/permissions. I solved it by installing another apache instance on a separate machine and then copying across the config and index files. I have no idea what of the root cause but... well it's done now.

0

Here what I did:

   21  wget "https://download.owncloud.org/community/owncloud-10.4.1.tar.bz2"
   22  tar -xvjf owncloud-10.4.1.tar.bz2
   23  rm /var/www/html/index.html
   24  mv owncloud/* /var/www/html
   25  apt search php apache2
   26  apt install libapache2-mod-php
   27  service apache2  restart
   28  apt install php7.3-zip php7.3-xml php7.3-intl php7.3-zip php7.3-gd php7.3-curl php7.3-mysql php7.3-mbstring
   29  service apache2  restart

With default settings apache2 started owncloud right away. I guess, you better: rm -r /var/www/html/*, apt purge apache2, rm -r /etc/apache2, apt install php7.3-zip php7.3-xml php7.3-intl php7.3-zip php7.3-gd php7.3-curl php7.3-mysql php7.3-mbstring libapache2-mod-php apache2. Maybe you need to do the same with php.

8
  • And thanks for the answers... I always do my research so can confirmed all dependencies installed + up to date. Apache was installed ages ago when I was first getting familiar with the rpi. I have no idea what I tinkering I did with it back then. So I uninstalled the lot. apache owncloud and reinstalled. I can confirm that this is a basic configuration error with apache mime handler config. Now I get the error AH01797: client denied by server configuration: /var/www/html/favicon.ico. Really, this should not be so difficult. I would just flash the drive but lots of work would be lost.
    – rodph
    Commented May 7, 2020 at 23:01
  • Just to confirm, the htaccess directive appears at the end of the vhosts config file. Yes? <Directory /var/www/html/> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Require all granted </Directory>
    – rodph
    Commented May 7, 2020 at 23:12
  • Posted my vhost files as an answer. It appears above. I also looked at apache.conf again just to confirm that the directive is accurately reflected there, too.
    – rodph
    Commented May 8, 2020 at 0:40
  • So issure resolved?
    – geoai777
    Commented May 8, 2020 at 8:29
  • Nope. I've just hit a wall. Not sure where to go from here. I've posted to stackoverflow, too. A much more concise writeup. Nothing back yet. See stackoverflow.com/questions/61670626/….
    – rodph
    Commented May 8, 2020 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .