Koozali.org: home of the SME Server

httpd URL alias

Offline axessit

  • *****
  • 213
  • +0/-0
httpd URL alias
« 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 ?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: httpd URL alias
« Reply #1 on: September 25, 2009, 10:05:34 PM »
hi

you could install in a z-sync ibay then follow this howto..

or, searching the forums for "httpd.conf alias", you'll find some examples 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

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: httpd URL alias
« Reply #2 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.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: httpd URL alias
« Reply #3 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?

* Stefano ignorant :-)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: httpd URL alias
« Reply #4 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?

* Stefano 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

?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: httpd URL alias
« Reply #5 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

or can it be (for instance):

http://domain.name/ActiveSync

?

the first one

Offline axessit

  • *****
  • 213
  • +0/-0
Re: httpd URL alias
« Reply #6 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 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.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: httpd URL alias
« Reply #7 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.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline axessit

  • *****
  • 213
  • +0/-0
Re: httpd URL alias
« Reply #8 on: October 18, 2009, 09:29:59 PM »
Quote
db accounts getprop Primary CgiBin
enabled