Hi There,
I have moved my Owncloud install from Ubuntu to CentOS 7.
moved the install directory from: /var/www/owncloud to /var/www/html/
I copied all the files including Config directory & /data directory. The IP of the server also changed from
our internal server http://192.168.10.153 to http://192.168.7.192
When I go to the web interface and try loading the login page, I get the following error. I am sure its probably an easy fix. I have made the changes already in the config.php with the new directory paths and new ip addresses.
Not Found
The requested URL /192.168.10.153/owncloud was not found on this server.
the URL bar has the following: http://192.168.7.192/192.168.10.153/owncloud
I already changed the âoverwrite.cli.urlâ => âhttp://192.168.10.192/â,
Any help would be appreciateed
Thanks
Yogesh
Have a look at your system log files, especially the apache error log should be helpful. You should be able to find this somewhere in /var/log
.
Make sure to also check your SELinux settings in CentOS and the labels on the files with ls - alZ /var/www/html
1 Like
This is what it looks like in that Directory:
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 3rdparty
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 apps
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 assets
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 AUTHORS
drwxrwxrwx. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 config
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 console.php
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 COPYING-AGPL
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 core
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 cron.php
drwxr-xâ. apache apache unconfined_u:object_r:user_home_t:s0 data
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 db_structure.xml
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 etc
-rw-râr--. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 .htaccess
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 index.html
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 index.php
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 info.php
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 l10n
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 lib
-rwxr-xâx. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 occ
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 ocs
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 ocs-provider
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 public.php
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 remote.php
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 resources
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 robots.txt
-rwxr-xâx. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 script.sh
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 settings
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 status.php
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 themes
drwxr-xâ. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 updater
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 .user.ini
-rw-r-----. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 version.php
Just to add more contextâŚ
the site starts to load, I can see the page header change to the name of our owncloud, then it redirects to
http://192.168.7.192/192.168.10.153/owncloud
Hope that helpsâŚ
Yogesh
Hi Yogesh,
Something is rewriting your URL incorrectly.
So you need to double check your Apache configuration, the .htaccess file in the owncloud path, and double check that your ownCloud isnât set up to rewrite the URL in your config.php
.
There are a bunch of settings like overwrite.cli.url
, you can read about them in the config.sample.php
Cheers,
Erik
1 Like
Sorry but this is not readable. Can you paste it enclosed in triple backticks (`)?
1 Like
Let me try again
âââ<?php
$CONFIG = array (
âmaintenanceâ => false,
âupdatecheckerâ => true,
âinstanceidâ => âoc0ai9dzo6n2â,
âpasswordsaltâ => âdsi1uRwiu5RV14R+U7V8b2mhrVjQX6â,
âsecretâ => âS3p2KOCFnDyMofwMCHaSLwK4baNr6/uaMyI9VLM4Amr30RxDâ,
âtrusted_domainsâ =>
array (
0 => â192.168.7.192â,
1 => âowncloud.slâ,
),
âdatadirectoryâ => â/var/www/html/dataâ,
âoverwrite.cli.urlâ => â/â,
âdbtypeâ => âmysqlâ,
âversionâ => â9.1.6.2â,
âdbnameâ => âsl_owncloudâ,
âdbhostâ => âlocalhostâ,
âdbtableprefixâ => âoc_â,
âdbuserâ => âoc_sl-adminâ,
âdbpasswordâ => â**********â,
âlogtimezoneâ => âUTCâ,
âinstalledâ => true,
âldapIgnoreNamingRulesâ => false,
âmail_smtpmodeâ => âsmtpâ,
âmail_smtphostâ => ââ,
âmail_from_addressâ => ââ,
âmail_domainâ => ââ,
âmail_smtpportâ => â25â,
âmail_smtpauthtypeâ => âLOGINâ,
âmail_smtpauthâ => 1,
âmail_smtpnameâ => ââ,
âmail_smtppasswordâ => ââ,
);âââ
Hereâs the .htaccess.
.htaccess.txt (225 Bytes)
Thinking about this a little more I think the problem is that apache is not allowed via SELinux to write to the .htaccess
file, therefore you will have to change the label on it.
You can quickly confirm this by setting your SELinux to permissive, restarting the server and double check if the problem persists.
1 Like
Still a no goâŚcould it be getting something from the DB by any chance? I am not sure where else I can check for that redirect
Yogesh
Did you check your apache configuration files? Is there any mention of the old IP?
grep -R 'ip.add.re.ss' /path/to/apache-configuration-folder
1 Like
the only place I found anything is the following.
grep -R âip.add.re.ssâ /etc/
/etc/php-fpm.d/www.conf:; âip.add.re.ss:portâ - to listen on a TCP socket to a specific address on
You should replace your old (now incorrect) IP address with ip.add.re.ss (you might have to escape the dots)
Great I got it figured outâŚ
Turns out to be a stupid redirect in the index.html not sure how that got there.
Now the issue is that the page loads blank. Is there a way to turn on some debugging to see why?
Thanks for all you help on that issue,âŚI really appreciate it.
Yogesh
When I check the status of owncloud by going to: http://192.168.7.192/status.php
it says: Data directory (/var/www/html/data) is invalid
Please check that the data directory contains a file â.ocdataâ in its root.
however I have checked and there is an .ocdata file in the root however its empty
Thanks
Yogesh
Hey,
i think this is strongly related to the following post as you need to do manual modifications within the ownCloud database when moving the data directory to a new location:
1 Like
I walked through the database changes in that document, only had to make one edit however the server is still showing a blank page when trying to go to the address.
Any help would be much appreciated
Yogesh
Tom,
I just wanted to say thank you for that last bit of help. I got it up and running now.
I really appreciate it
Thanks
Yogesh
1 Like