Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th December 2011, 22:46
sellotape sellotape is offline
Member
 
Join Date: Oct 2010
Location: Maltby, UK
Posts: 65
Thanks: 12
Thanked 4 Times in 3 Posts
Default nginx - Squirrelmail - 404 Not found - uBuntu 11.10

Hi there.

When I attempt to forward or hit 'Send' to send an e-mail I receive a 404 error message in the right 'mail' frame (the left frame with the folders remains).

I have a feeling it might have something to do with squirrelmail not talking to nginx properly but I am unsure what steps to take to resolve.


Thanks


Last edited by sellotape; 10th December 2011 at 23:09. Reason: Added image
Reply With Quote
Sponsored Links
  #2  
Old 10th December 2011, 23:40
sellotape sellotape is offline
Member
 
Join Date: Oct 2010
Location: Maltby, UK
Posts: 65
Thanks: 12
Thanked 4 Times in 3 Posts
Default

I've done a bit of digging and it would appear that there is a problem in the URL...

http://server1.example.com/squirrelmail/src/compose.php/squirrelmail/src/compose.php?mail_sent=yes

I haven't got the foggiest why it's replicating the directory in the URL... Any thoughts?
Reply With Quote
  #3  
Old 11th December 2011, 22:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Use http://server1.example.com:8081/squirrelmail/ to access SquirrelMail.
__________________
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
  #4  
Old 11th December 2011, 23:10
sellotape sellotape is offline
Member
 
Join Date: Oct 2010
Location: Maltby, UK
Posts: 65
Thanks: 12
Thanked 4 Times in 3 Posts
Default

Hi Falko - It does the same even when using the link you specified.

I think it has something to do with the way Nginx is handling pgp scripts... It is duplicating the directory it is in when attempting to perform an action..

For instance...

http://server1.example.com:8081/squirrelmail/src/compose.php/squirrelmail/src/compose.php?mail_sent=yes

Not figured it out yet... But if anyone knows what is happening please let me know - or if I find out I will post an update here!


Thanks

Last edited by sellotape; 11th December 2011 at 23:24.
Reply With Quote
  #5  
Old 12th December 2011, 19:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Can you post your /etc/nginx/nginx.conf?
__________________
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
  #6  
Old 12th December 2011, 21:44
sellotape sellotape is offline
Member
 
Join Date: Oct 2010
Location: Maltby, UK
Posts: 65
Thanks: 12
Thanked 4 Times in 3 Posts
Default

Hi Falko.

I gave up and did a fresh install with Apache.
I am no expert using Linux but it's something I like to do in my spare time to enhance my knowledge of running a server!

HowtoForge has been a brilliant support site for me - thank you to all for your support!


Please feel free to delete this thread.


Thanks
Reply With Quote
The Following User Says Thank You to sellotape For This Useful Post:
falko (13th December 2011)
  #7  
Old 30th December 2012, 17:06
wiebew wiebew is offline
Junior Member
 
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default The solution for nginx squirrelmail problems

Hi Falko the problem lies with the settings to be pasted mentioned in the (otherwise very thrustworthy) perfect server tutorial for step 21 at the bottom. My guess is that the SCRIPT_FILENAME is set wrong in the original script

The wrong settings are:
Code:
location /squirrelmail {
       root /usr/share/;
       index index.php index.html index.htm;
       location ~ ^/squirrelmail/(.+\.php)$ {
               try_files $uri =404;
               root /usr/share/;
               fastcgi_pass 127.0.0.1:9000;
               fastcgi_param HTTPS on; # <-- 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 ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
               root /usr/share/;
       }
}
location /webmail {
       rewrite ^/* /squirrelmail last;
}
The good settings are
Code:
location /squirrelmail {
       root /usr/share/;
       index index.php index.html index.htm;
       location ~ ^/squirrelmail/(.+\.php)$ {
               try_files $uri =404;
               root /usr/share/;
               include /etc/nginx/fastcgi_params;
               # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
               fastcgi_pass 127.0.0.1:9000;
               fastcgi_index index.php;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_buffer_size 128k;
               fastcgi_buffers 256 4k;
               fastcgi_busy_buffers_size 256k;
               fastcgi_temp_file_write_size 256k;
       }
       location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
               root /usr/share/;
       }
}
location /webmail {
       rewrite ^/* /squirrelmail last;
}
Reply With Quote
Reply

Bookmarks

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
nginx + php-fpm = various problems for SOME sites inc 500 or 404 or no input file talkingnews Installation/Configuration 3 11th December 2011 19:02
Cannot login to phpmyadmin penkku HOWTO-Related Questions 1 24th February 2011 10:26
Setting up a new server - Suse 11.1 londonman Server Operation 34 10th April 2009 14:16
log files, rotation and emailing them hairydog2 General 65 11th October 2006 14:18
Having Problems with KWiFiManager sbovisjb1 Installation/Configuration 7 17th April 2006 23:53


All times are GMT +2. The time now is 03:35.


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