I am working on moving current setup of owncloud from sub-domain https://cloud.example.com
to sub-directory https://example.com/cloud
to make all my apps covered by one SSL certificate. The problem is that owncloud makes redirect to login page, but Apache makes it within virtual host's DocumentRoot. Alias /cloud doesn't work - every request from /cloud fall to the main site. And PHP-FPM 7.3.33 throws error "Got error 'Primary script unknown'".
So, my httpd.conf:
<VirtualHost *:443>
ServerName example.com
DocumentRoot /var/www/html
Alias /cloud /var/www/owncloud
<Directory /var/www/owncloud>
SSLRequireSSL
Options +FollowSymLinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
SetEnv MOD_X_SENDFILE_ENABLED 1
XSendFile On
XSendFilePath /var/tmp
</Directory>
</VirtualHost>
/var/www/owncloud/config/config.php:
'trusted_domains' =>
array (
0 => 'locahost',
1 => 'example.com',
),
'datadirectory' => '/var/lib/owncloud',
'overwrite.cli.url' => 'https://example.com/cloud',
'overwritewebroot' => '/cloud',
How can I achieve that?
Thank you.