(SOLVED) NextCloud Installation

Hi,

I`m installing NextCloud 12.0.2 in Ubuntu server 16.04.3 with LAMP + php 7.0. The installation goes well, but when I try to go http://ipaddress/nextcloud appears 404 not found.
The config of /etc/apache2/sites-available/nextcloud.conf is:
<VirtualHost *:80>
ServerAdmin admin@ubuntu
DocumentRoot "/var/www/html/nextcloud/"
ServerName ipaddress
ServerAlias ubuntu
<Directory “/var/www/html/nextcloud/”>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

Selinux is need to configure?

thanks all!

Try without the subfolder: https://ipaddress

thank you!

But the error is the same.

Make sure that in /etc/apache2/sites-enabled/* are no other files that define a <VirtualHost *:80>. Sometimes the logfiles can help to see where the webserver tries to access files.
If you use security modules like SELinux, you should check their logfiles and enhance logging in case they are preventing access.

what about firewall? and systemctl status apache2

In /etc/apache2/sites-enabled/* I have 000-default.conf default-ssl.conf nextcloud.conf files. But first and second files I dont know what it is… I need to delete that files? thanks. I dont use SELinux

Arman_Khalatyan apache status is active, thank you

In /var/log/apache2/error.log I found this…
[Wed Sep 06 13:02:56.232606 2017] [mpm_prefork:notice] [pid 12909] AH00169: caught SIGTERM, shutting down
[Wed Sep 06 13:02:57.366339 2017] [mpm_prefork:notice] [pid 15191] AH00163: Apache/2.4.18 (Ubuntu) configured – resuming normal operations
[Wed Sep 06 13:02:57.366398 2017] [core:notice] [pid 15191] AH00094: Command line: ‘/usr/sbin/apache2’

If I go to the file /usr/sbin/apache2 it appears:

^?ELF^B^A^A^@^@^@^@^@^@^@^@^@^C^@>^@^A^@^@^@�4^C^@^@^@^@^@@^@^@^@^@^@^@^@�^T
^@^@^@^@^@^@^@^@^@@^@8^@ ^@@^@^]^@^^@^F^@^@^@^E^@^@^@@^@^@^@^@^@^@^@@^@$
^@“�^D���^D��^@^@^C^A^DE^@^P^B��2”^@^@�Q(^B^B^B^R$(^D�@4�^L^D^@^D^P��^D^@�^@^H^$
H�^W^@^B^B^L^@^P^H^@^D�^C�@��^Q0^P^PH!@^D^P8^@^H^H^B�@^@H� ��^H^D0^@^D^A0^H^@$
�^Bn"^B�^F�^@^@R^[^D^H^HD�^V^T^@�^R^D^A^G^NB^A^@^H^@8^B ^P �^D�^P$^A�(1�^P^C^@^$
^U�^Tx0^@ ��� �^L^@^L��x�^@^Q^@^B�^E �^AAƉ�^FI�Aw�L��b�b&(^T4�^A^A$
��^H^P�^@^H^@T ^H�p^A^H^P@^P^H���^BQ"�^P^BD2^P�Z^E^H� �^H@�^L����^P^Tp��<^Ha^$
^V)@!^P ^A^E ^@^H^A ^B�^H^@^@^@^H
^H^@^H`@^P^E�^P!^A���^R
�^E�A^B^Y^B�^A$^D^H^E^UQ^DB^@^@�^H@�0�^H^@^C^B^@�^L�CA^P�i�I& ^SH��^@D$@^E ^@�&$

^S^P^@D^@`�^D2^R-^@@^Ry��^R^H�H �Pd^H�^H^@�^@�^@^X@^A^@^C^@ ^@hB^M �^X^V^@@^Q�^$
^D(^@^G^C^C^D^F^L^RA<^Be^P �/^@^PB@@��^F"^@�-�
L)^U^@�h^F^H2 ^@^TB�1^@^A^@E � ^G^@"(�^B�^B^@�^@�^@!^@A^@��^@�j^A���^B^Ha^L^$
�w^AP^ERP^@ x�^H^D�^A^A^P�^L^@@^T^S�^D��"^T�^@ ^X��^D^M^B�^T^Z@^D@^@G^P�^A"^D^@$
�Q�
^@^P@^A^@^@^@^D^H�^@�^B�0b!^H^@IP�^A L^Hz(�^@���d^Y^V
^@j^P*�@r^@@"^C^B�^A�^@�I^@�( ^V��.HA
^CV�H^P^@�^@h�

all file with this simbols…

000-default.conf also contains a port 80 vhost. Disable it by a2dismod 000-default.conf or directly remove the symlink. The other conf btw contains the port 443/ssl vhost, in case you use it (what I would clearly recommend).

Thank you!! The problem was the symlink file 000-default.conf. Thak you so much!