Login doesn't preserve port

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Login doesn't preserve port

Cornelius Schumacher
When I run owncloud on a non-standard port like
http://example.com:16080/owncloud and I login via the web interface, I end up
at http://example.com/owncloud instead of http://example.com:16080/owncloud. I
assume this is a bug in the code, or can this be configured somehow?

--
Cornelius Schumacher <schumacher at kde.org>

Reply | Threaded
Open this post in threaded view
|

Re: Login doesn't preserve port

Aldo "xoen" Giambelluca
2010/12/23 Cornelius Schumacher <schumacher at kde.org>:
> When I run owncloud on a non-standard port like
> http://example.com:16080/owncloud and I login via the web interface, I end up
> at http://example.com/owncloud instead of http://example.com:16080/owncloud. I
> assume this is a bug in the code, or can this be configured somehow?
Hi, it's strange, ownCloud URLs are relative to the HTTP host, it
should work I guess.

Try to add these 3 lines in inc/lib_base.php after the line
#40/$WEBROOT assignment :

if ( $_SERVER["SERVER_PORT"] != 80 ) {
        $WEBROOT = ":" . $_SERVER["SERVER_PORT"] . $WEBROOT;
}

I don't know if it's the "right" way to solve the problem but could work.



--
Aldo "xoen" Giambelluca
-.. --- -. .----. - / .--. .- -. .. -.-.