Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: axessit on September 25, 2009, 03:55:58 PM

Title: httpd URL alias
Post by: axessit on September 25, 2009, 03:55:58 PM
Trying to set up z-push to work with imap (says it now supports it). When I get it working I'll write a how-to. I don't want to install zarafa as I'm only interested in getting email going via mobile at this stage.

Have downloaded z-push and installed, but getting stuck trying to get the web alias working.

The manual says you must configure Apache to redirect the URL 'Microsoft-Server-ActiveSync' to the index.php
file in the z-push directory. This can be done by adding the line:

Quote
Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php
to your httpd.conf file. Make sure that you are adding the line to the correct part of your Apache
configuration, taking care of virtual hosts and other Apache configurations.

I've created the custom template /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf and created a file S95z-push with the following

Quote
# Z-push

Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php

Created an .htaccess file with

php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on


and run expand-template /etc/httpd/conf/httpd.conf then restarted
sv httpd-e-smith restart

Now when I got to http://server/Microsoft-Server-ActiveSync I get 403 forbidden.

So do I need to set some access permissions somewhere ?
Title: Re: httpd URL alias
Post by: Stefano on September 25, 2009, 10:05:34 PM
hi

you could install in a z-sync ibay then follow this (http://wiki.contribs.org/Htaccess) howto..

or, searching the forums for "httpd.conf alias", you'll find some examples (http://forums.contribs.org/index.php/topic,41488.0.html) of template fragments..

NOTE: you could put the php_flags into the fragment

if you get it working, please write an how-to, thank you

HTH
Title: Re: httpd URL alias
Post by: CharlieBrady on September 26, 2009, 08:51:28 PM
It might be possible to avoid a custom template if the application is installed in an i-bay.
Title: Re: httpd URL alias
Post by: Stefano on October 01, 2009, 05:45:01 PM
It might be possible to avoid a custom template if the application is installed in an i-bay.

mmmhh.. sounds interesting (I'm testing zarafa and z-push could be a big improvement for me), but how do I create this alias
Code: [Select]
Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php

without a custom template?

/me ignorant :-)
Title: Re: httpd URL alias
Post by: CharlieBrady on October 05, 2009, 10:41:58 PM
mmmhh.. sounds interesting (I'm testing zarafa and z-push could be a big improvement for me), but how do I create this alias
Code: [Select]
Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php

without a custom template?

/me ignorant :-)

You wouldn't. You would add an i-bay called 'Microsoft-Server-ActiveSync, which would use the path:

/home/e-smith/files/ibays/Microsoft-Server-ActiveSync/html/index.php

[except that you may be prevented from using that as the i-bay name. Does the URL have to be:

http://domain.name/Microsoft-Server-ActiveSync

or can it be (for instance):

http://domain.name/ActiveSync

?
Title: Re: httpd URL alias
Post by: Stefano on October 05, 2009, 10:53:16 PM
You wouldn't. You would add an i-bay called 'Microsoft-Server-ActiveSync, which would use the path:

/home/e-smith/files/ibays/Microsoft-Server-ActiveSync/html/index.php

mmhh... I was just thinking the same thing.. but I have to change the max length for ibay name..

Quote
except that you may be prevented from using that as the i-bay name.

right

Quote
Does the URL have to be:

http://domain.name/Microsoft-Server-ActiveSync (http://domain.name/Microsoft-Server-ActiveSync)

or can it be (for instance):

http://domain.name/ActiveSync (http://domain.name/ActiveSync)

?

the first one
Title: Re: httpd URL alias
Post by: axessit on October 16, 2009, 05:59:34 PM
OK, got something working, but not what I expected. When i navigate to the page, after authentication, I just get a text page (the php index)

Quote
<?php
/***********************************************
* File      :   index.php
.....

Do I need to enable PHP execution somewhere ? Never done anything with php before, so might need to bear that in mind. I read the http://wiki.contribs.org/PHP#Modifying_the_PHPBaseDir_setting_for_an_ibay (http://wiki.contribs.org/PHP#Modifying_the_PHPBaseDir_setting_for_an_ibay) manual page but kindof got lost as it refers to an ibay, and I am trying to install in a var folder. Interesting that when I did the
Code: [Select]
db accounts getprop Primary PHPBaseDir command I got nothing, yet I thought PHP was enabled in my Primary ibay - at least that's what the server-manager says.
Title: Re: httpd URL alias
Post by: cactus on October 17, 2009, 09:14:30 AM
yet I thought PHP was enabled in my Primary ibay - at least that's what the server-manager says.
Does it? What is the output of the following command:

Code: [Select]
db accounts getprop Primary CgiBin
If it is enabled then PHP should be enabled otherwise it is not.
Title: Re: httpd URL alias
Post by: axessit on October 18, 2009, 09:29:59 PM
Quote
db accounts getprop Primary CgiBin
enabled