0

I just installed Armbian on my BananaPi with NextCloud, MySQL Database and Apache2. But i always get a "Page not found" Error.

Here is my /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    ServerName www.my-domain.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/nextcloud

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

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

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

<Directory /var/www/nextcloud>
Options +FollowSymlinks
AllowOverride All
</Directory>

Can you help me with this problem?

Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
Herbert89
  • 1,113
  • 1
  • 8
  • 7

1 Answers1

0

Try and move your Directory stanza into the VirtualHost.

Ray Hunter
  • 15,137
  • 5
  • 53
  • 51
  • Now he is saying: Not Found The requested URL /nextcloud/index.php was not found on this server. – Herbert89 Feb 18 '17 at 23:13
  • Then run it a `locahost` as your DocumentRoot already points to the `nextcloud` directory – RiggsFolly Feb 18 '17 at 23:19
  • How can i do this? The Server is Running on a Banana Pi. – Herbert89 Feb 19 '17 at 07:48
  • @Herbert89 remove the /nextcloud/ from the url in the browser. You already have that folder defined in the **Directory** stanza in the configuration. – Ray Hunter Feb 19 '17 at 18:08
  • @srayhunter How can i fix this one: Now: mydomain.com/nextcloud -> mydomain.com (Open my Nextcloud and not the default Apache site) – Herbert89 Feb 19 '17 at 18:19
  • @Herbert89 you will have to provide more information. I am not sure what you are asking or what the problem seems to be. – Ray Hunter Feb 19 '17 at 18:25
  • @srayhunter Now I can go to my nextcloud via exampledomain.com/nextcloud but i want to go to my nextcloud via exampledomain.com . So i do not need the /nextcloud. On Exampledomain.com is now the default Apache Site. – Herbert89 Feb 19 '17 at 18:27
  • Your document root should be setup to point to that directory on the server - DocumentRoot /var/www/nextcloud so that you dont have to add it to the end of exampledomain.com/ – Ray Hunter Feb 19 '17 at 18:31
  • I solved the problem with a redirection site. But thanks @srayhunter – Herbert89 Feb 19 '17 at 18:43