SOLVED Windows 2012 IIS 8.5 redirects to localhost from url.

Ask all your questions regarding OC 6.x Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read How To Solve Problems By Yourself

SOLVED Windows 2012 IIS 8.5 redirects to localhost from url.

Postby EzdineG » Tue Mar 04, 2014 12:03 am

I've recently installed Owncloud 6.0.2 using the instructions in the documentation for Windows 2008 / 7. Everything seems to be in order, except for navigating the site remotely.

From a remote machine, typing http://my.url.com/owncloud and then logging in I get redirected to http://localhost/owncloud/index.php/apps/files. At this point I can manually change the localhost back to my url and everything works as it should, but explaining this to the users is not as easy as it should be. I'm not too familiar with IIS, but unfortunately the platform choice is out of my hands.

I've searched all day and it doesn't seem to be IIS that is doing the redirecting, any help would be appreciated. The system otherwise works as it should.

Environment: VServer
Server: IIS 8.5 (Windows Server 2012)
Database: Mysql
Client: Any
OC-Version: Owncloud 6.0.2
PHP-Version: 5.5.9
Last edited by EzdineG on Wed Mar 05, 2014 2:22 am, edited 1 time in total.
EzdineG
Newbie
 
Posts: 2
Joined: Mon Mar 03, 2014 11:33 pm
ownCloud version: 6.0.1
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.6

Re: Windows 2012 IIS 8.5 redirects to localhost from url.

Postby Boseley01 » Tue Mar 04, 2014 12:32 pm

I also have the same issue, and have opened an issue thread on github:

https://github.com/owncloud/core/issues/7524
Boseley01
Newbie
 
Posts: 4
Joined: Tue Mar 04, 2014 12:10 pm
ownCloud version: 6.0.1
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4.25

Re: Windows 2012 IIS 8.5 redirects to localhost from url.

Postby Boseley01 » Tue Mar 04, 2014 12:53 pm

EzdineG wrote:I've recently installed Owncloud 6.0.2 using the instructions in the documentation for Windows 2008 / 7. Everything seems to be in order, except for navigating the site remotely.

From a remote machine, typing http://my.url.com/owncloud and then logging in I get redirected to http://localhost/owncloud/index.php/apps/files. At this point I can manually change the localhost back to my url and everything works as it should, but explaining this to the users is not as easy as it should be. I'm not too familiar with IIS, but unfortunately the platform choice is out of my hands.

I've searched all day and it doesn't seem to be IIS that is doing the redirecting, any help would be appreciated. The system otherwise works as it should.

Environment: VServer
Server: IIS 8.5 (Windows Server 2012)
Database: Mysql
Client: Any
OC-Version: Owncloud 6.0.2
PHP-Version: 5.5.9


Hi, the resolution to this problem was provided to me on github, please see below link to see if it also resolves yours. Thank you.

https://github.com/owncloud/core/issues/7524
Boseley01
Newbie
 
Posts: 4
Joined: Tue Mar 04, 2014 12:10 pm
ownCloud version: 6.0.1
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.4.25

Re: Windows 2012 IIS 8.5 redirects to localhost from url.

Postby EzdineG » Wed Mar 05, 2014 2:22 am

Boseley01 wrote:Hi, the resolution to this problem was provided to me on github, please see below link to see if it also resolves yours. Thank you.

https://github.com/owncloud/core/issues/7524

The solution was as PVince81 described on your github post. All I had to do was add my domain to the list of trusted domains in the config.php file like so:

'trusted_domains' =>
array (
0 => 'localhost',
1 => 'my.domain.here',
),

Thanks for letting me know!
EzdineG
Newbie
 
Posts: 2
Joined: Mon Mar 03, 2014 11:33 pm
ownCloud version: 6.0.1
Webserver: IIS
Database: MySQL
OS: Windows Server
PHP version: 5.6

Re: SOLVED Windows 2012 IIS 8.5 redirects to localhost from

Postby davleema » Sat Apr 05, 2014 8:37 pm

I had the same problem (when connecting to my owncloud server by it's external hostname, I was redirected to it's internal hostname). I got rid of this problem by simply removing the trusted-domains setting from config.php.
David
Apache 2.4.9 - MySQL 5.5 - PHP 5.5.x - Slackware64
davleema
Beginner
 
Posts: 19
Joined: Wed Apr 03, 2013 12:35 am
ownCloud version: 6.0.3
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.14

Re: SOLVED Windows 2012 IIS 8.5 redirects to localhost from

Postby Rancor » Sun Apr 06, 2014 9:56 am

Hi,

instead of removing the trusted-domains setting add the external hostname to the trusted-domains setting.
*mostly inactive*
Rancor
OwnCloud master
 
Posts: 7389
Joined: Sat May 26, 2012 2:00 pm
ownCloud version: 6.0.3
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.5.x


Return to ownCloud Community Edition 6.x

Who is online

Users browsing this forum: No registered users and 9 guests