1

I installed owncloud and applied SSL on it, Later i create a virtual host for https

> <VirtualHost *:80>
>     ServerName owncloud
>     Redirect permanent / https://xxx.xxx.xxx.xxx/ </VirtualHost>
> 
> NameVirtualHost *:443 <VirtualHost *:443>
>     SSLEngine on
>     SSLCertificateFile /etc/pki/tls/certs/owncloud.crt
>     SSLCertificateKeyFile /etc/pki/tls/private/owncloud.key
>     <Directory /var/www/html>
>     AllowOverride All
>     </Directory>
>     DocumentRoot /var/www/html/owncloud
>     ServerName owncloud
>     ErrorLog logs/owncloud-error_log
>     CustomLog logs/owncloud-access_log common
> 
>         <IfModule mod_headers.c>
>           Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"
>         </IfModule>
> 
> </VirtualHost>

And then restarted the HTTPD and accessed from browser and it was working fine. Then i restarted the OS , when it cameback online i again tried to access but this time i got this error

Forbidden You don't have permission to access /owncloud/ on this server.

Permission for /var/www/html/ drwxr-xr-x 3 root root 22 Nov 8 16:53 /var/www/html/

Permission for /var/www/html/owncloud drwxr-xr-x 12 apache apache 4096 Nov 15 14:03 /var/www/html/owncloud/

Inside Owncloud directory

-rw-r--r--  1 apache apache 1.8K Sep 15 10:42 status.php
-rw-r--r--  1 apache apache 5.4K Sep 15 10:42 remote.php
-rw-r--r--  1 apache apache 3.2K Sep 15 10:42 public.php
-rw-r--r--  1 apache apache 3.9K Sep 15 10:42 index.php
-rw-r--r--  1 apache apache  179 Sep 15 10:42 index.html
-rw-r--r--  1 apache apache  31K Sep 15 10:42 db_structure.xml
-rw-r--r--  1 apache apache 4.9K Sep 15 10:42 cron.php
-rw-r--r--  1 apache apache 4.3K Sep 15 10:42 console.php
drwxr-xr-x 12 apache apache  225 Sep 15 10:43 settings
drwxr-xr-x  4 apache apache   39 Sep 15 10:43 resources
drwxr-xr-x  2 apache apache   23 Sep 15 10:43 ocs-provider
drwxr-xr-x  2 apache apache   73 Sep 15 10:43 ocs
-rwxr-xr-x  1 apache apache  283 Sep 15 10:43 occ
drwxr-xr-x  6 apache apache  101 Sep 15 10:43 lib
drwxr-xr-x  3 apache apache   32 Sep 15 10:43 l10n
-rw-r--r--  1 apache apache  34K Sep 15 10:43 COPYING
-rw-r--r--  1 apache apache  25K Sep 15 10:43 CHANGELOG.md
-rw-r--r--  1 apache apache 8.7K Sep 15 10:43 AUTHORS
drwxr-xr-x  6 apache apache  130 Sep 15 10:43 updater
drwxrwxrwx 25 apache apache 4.0K Sep 15 10:46 apps
-rw-r--r--  1 apache apache  271 Sep 15 10:47 version.php
lrwxrwxrwx  1 apache apache    5 Nov  8 17:28 data -> /data
drwxrwxrwx  2 apache apache   49 Nov 12 12:01 config
drwxr-xr-x 17 apache apache 4.0K Nov 13 09:36 core

SELinux is Disabled

What i'm missing ?

closed as too broad by sebasth, G-Man, RalfFriedl, Isaac, jimmij Sep 13 '18 at 11:34

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This may have something to do with the difference between Redirect and Rewrite ... your owncloud configuration may be generating http links while the client is sent to https links... You could probably check this by simply mv index.php index_old.php and touch index.html in your /var/www/html/ directory... and see if you get the same error... if so, try rewrite instead and of course mv index_old.php index.php to set things back in order. – RubberStamp Nov 15 '17 at 14:11
0

Did you check:
https://doc.owncloud.org/server/10.0/admin_manual/installation/installation_wizard.html#post-installation-steps

There is a script that restores proper permissions after owncloud installation

Additionally, did you check apache2 error logs for more information?

  • I run the script and script ran successfully and i suppose if there ever was perm problem it should have fixed it, but still receiving same access denied message. in owncloud-error.log file im receiving this message "[Wed Nov 15 14:28:08.336169 2017] [ssl:warn] [pid 3437] AH01909: RSA certificate configured for owncloud:443 does NOT include an ID which matches the server name [Wed Nov 15 14:28:08.436442 2017] [ssl:warn] [pid 3437] AH01909: RSA certificate configured for owncloud:443 does NOT include an ID which matches the server name " – OmiPenguin Nov 15 '17 at 11:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.