[horde] Https + Horde 4 in a subdir

Michael J Rubinsky mrubinsk at horde.org
Thu Feb 2 00:13:28 UTC 2012


Quoting Michael Post <michael.post at purematic.de>:

> Hello Michael,
>
> i am too stupid for it.
>
> It does not run for me.
>
> For your Info:
> This is my horde dir
>
> admin
> .htaccess
> index.php
> js
> locale
> rampage.php
> rpc.php
> services
> static
> test.php
> util
> config
> imp
> lib
> login.php
> rpc
> scripts
> signup.php
> templates
> themes
>
> As you can see, only my webroot is different, not the filesystem.

$app_fileroot defines where to find the /horde directory on your  
filesystem, not what is located within that directory. It would be  
normally automatically be set to something like  
'/var/www/html/horde/config/../' by Horde. It is helpful to set this  
manually anytime Horde may not be able to figure this out  
automatically - like when the horde install is symlinked.

Also, since you say above that this is your "/horde" directory - how  
are you telling the webserver to serve the /subdomain.dir path?  What  
I usually do when this is required is to change the name of the /horde  
folder on the filesystem.

The fact that you are being redirected to domain.com/login instead of  
either domain.com/horde/login.php or domain.com/subdomain.dir/login  
tells me that the $app_webroot setting is probably incorrect.


> Now my problem: I see the login page correctly and can fill the  
> fields. After sending the form, i get an 404.
> The url now which will be called is
> 	https://www.domain.com/login.php
>
> The correct url has to be
> 	https://www.domain.com/subdomain.dir/login.php
>
> Whatever i set to
>
> $conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];

This is fine, as long as $_SERVER['SERVER_NAME'] is what you expect it  
to be (www.domain.com).


> $this->applications = array(
>     'horde' => array(
> 	 'fileroot' => dirname(__FILE__) . '/../',
>         'webroot' => $this->applications['horde']['webroot'] .  
> '/subdomain.dir',

First off, you probably shouldn't be defining these within the 'horde'  
stanza. You should set the bare $app_webroot and $app_fileroot  
variables as described at the end of the comments in the file header.  
Otherwise, you will need to set these values for every application you  
use. In fact, if you are using IMP auth then this may very well be  
your issue.

Secondly, this line is self-referential and is not doing what you  
think. This line is *defining*  
$this->applications['horde']['webroot'], so you can't use it as part  
of the assignment. In other words, this value is not defined here yet  
to use it. The end result might actually be OK, since it will probably  
resolve to '/subdomain.dir', but it will throw a WARNING.

Of course, the webserver needs to know about this path...if you don't  
rename the /horde folder, how does the webserver know where to find  
/horde? Did you do this via Apache config directives?

-- 
Michael J Rubinsky
Partner, Senior Developer
Horde, LLC
mrubinsk at horde.org
http://www.horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6096 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/horde/attachments/20120201/24a7f7ed/attachment-0001.bin>


More information about the horde mailing list