Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th August 2012, 20:39
swehes swehes is offline
Junior Member
 
Join Date: Apr 2011
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to replace Apache with Nginx on Horde installation?

So I followed the instructions on "Install Horde 4 Webmail For ISPConfig On Debian Squeeze Through PEAR" on a clients Ubuntu Machine. It worked great (after I realized I needed to go in and point IMP to my email server). However on my own machine I am running Nginx for testing and I have been trying to figure out how to make the Directive work.

I found some samples at http://comments.gmane.org/gmane.comp.horde.user/28055 but even with changing some things to fit more in my server, it still doesn't work. Then I took my Roundcube directives and tried to change the root folder and directory so it would point in the right direction but still get the 404 error.

Does anyone running nginx and Horde have the instructions on how to get it to work?

Also what PHP open_basedir does Horde need in ISPconfig?
Reply With Quote
Sponsored Links
  #2  
Old 16th August 2012, 11:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Where exactly do you get the 404?

Can you post the Apache rewrite rules and the ones you're using for nginx so far?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th August 2012, 01:51
swehes swehes is offline
Junior Member
 
Join Date: Apr 2011
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

The 404 comes with I try http://www.domain.com/horde

Directives for Apache I just used the howtoforge instructions on http://www.howtoforge.com/install-ho...e-through-pear

Alias /Microsoft-Server-ActiveSync /var/www/horde/rpc.php
Alias /horde /var/www/horde
<Directory /var/www/horde>
Options +FollowSymLinks
AllowOverride None
order allow,deny
allow from all
AddType application/x-httpd-php .php
php_value include_path ".:/usr/share/php"
php_value open_basedir "none"
php_value upload_tmp_dir "/var/www/horde/phptmp/"
</Directory>

Nginx directives according to http://comments.gmane.org/gmane.comp.horde.user/28055
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param HTTPS $php_https;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location /Microsoft-Server-ActiveSync {
alias /var/www/horde/rpc.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param HTTPS $php_https;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

Trying to use Roundcube directives with Horde changes:
location /horde {
root /var/www/;
index index.php index.html index.htm;
location ~ ^/horde/(.+\.php)$ {
try_files $uri =404;
root /var/www/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param HTTPS $fastcgi_https; # <-- add this line
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
location ~* ^/horde/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt|php ))$ {
root /var/www/;
}
}
location /webmail2 {
rewrite ^/* /horde last;
}
Reply With Quote
  #4  
Old 18th August 2012, 13:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Does Horde use any .htaccess files with rewrite rules?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 19th August 2012, 03:11
swehes swehes is offline
Junior Member
 
Join Date: Apr 2011
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Yes. The .htaccess is as follows.

allow from all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ rampage.php [QSA,L]
</IfModule>
Reply With Quote
  #6  
Old 19th August 2012, 12:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by swehes View Post
allow from all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ rampage.php [QSA,L]
</IfModule>
This is equivalent to

Code:
       location / {
                try_files $uri $uri/ /rampage.php?$args;
       }
on nginx.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Tags
horde, nginx directives, open_basedir

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig3 with NGINX and HORDE arstacey Server Operation 5 24th June 2012 15:44
Fixing 404 Not Found Errors on Apache on Centos 5 x86_64 Dedi LinuxOnMyMac HOWTO-Related Questions 11 16th October 2010 05:29
Can all the installation and configuration be automated (Kickstart) gabby Installation/Configuration 0 30th January 2010 20:47
Mail Server Setup With Exim, MySQL, Cyrus-Imapd, Horde Webmail On Centos 5.1 - issue c0mrade HOWTO-Related Questions 25 19th April 2009 19:11
How to install OpenOficeOrg 3.0.0 in Ubuntu 8.04 ernesthagger HOWTO-Related Questions 43 23rd December 2008 15:42


All times are GMT +2. The time now is 07:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.