Owncloud/Apache2 are redirecting to FDQN.com/index.php/login
which doesn’t load " This site can’t be reached"
Expect to redirect to FDQN.com/**owncloud**/index.php/login
which does load.
How to get owncloud/apache to include the subdirectory?
I tried adding to owncloud.conf in apache sites-available/enabled
RedirectMatch ^/$ /owncloud/index.php/login
But it doesn’t work well and feels like a sticky plaster.
Steps to reproduce
- go to
FQDN.com
Expected behaviour
Expect to redirect to FDQN.com/owncloud/index.php/login
Actual behaviour
Instead get routed to FDQN.com/index.php/login
which doesn’t work
Manually changing domain and path to FDQN.com/owncloud/index.php/login
does work
Server configuration
Operating system: Ubuntu 20.04.1
Web server: Apache 2.4.41
Database: n/a
PHP version: n/a
ownCloud version: 10.5.0.10
Updated from an older ownCloud or fresh install: Update from prior version (unknown)
Where did you install ownCloud from: owncloud.org repo
Signing status (ownCloud 9.0 and above): Where to find this?
Login as admin user into your ownCloud and access
paste the results into h and puth the link here.
No errors have been found.
The content of config/config.php:
<?php
$CONFIG = array (
'updatechecker' => false,
'instanceid' => 'REDACT',
'passwordsalt' => 'REDACT',
'secret' => 'REDACT',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '192.168.1.100',
2 => 'FQDN.com',
),
'datadirectory' => '/var/www/owncloud/data',
'overwrite.cli.url' => 'https://localhost/owncloud',
'dbtype' => 'sqlite3',
'version' => '10.5.0.10',
'logtimezone' => 'UTC',
'installed' => true,
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
'logtimezone' => 'Europe/London',
);
Apache virtualhost config:
#Alias /owncloud "/var/www/owncloud/"
<VirtualHost *:443>
Alias /owncloud "/var/www/owncloud/"
ServerName FQDN.com
DocumentRoot /var/www/owncloud
# RedirectMatch ^/$ /owncloud/index.php/login #this doesn't really work very well
<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
# Satisfy Any
</Directory>
<Directory "/var/www/owncloud/data/">
Require all denied
</Directory>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
</VirtualHost>
Client configuration
Browser: Chrome