Squirrelmail / Nginx Redirect - 404 Error

Discussion in 'Server Operation' started by Deex, May 18, 2018.

  1. Deex

    Deex New Member

    Hey, i'm using the latest Squirrelmail Web- Interface,
    with Debian, Nginx, Dovecot, Postfix

    If i try to delete or Write a E-Mail i will be redirectet to a 404 Page because of a double URL redirect.
    The URL that i'm redirected to is:

    IP/squirrelmail/src/right_main.php/squirrelmail/src/right_main.php?mailbox=INBOX&startMessage=1&composenew=0&composesession=0&session=0&use_mailbox_cache=0

    I guess that it is a issue witht he NGINX rewrite but wasn't able to figure it out also if tried a lot of example out there

    My current NGINX Config File is (related to the howtoforge tutorial)

    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 unix:/var/run/php5-fpm.sock;
                           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;
            }
     

Share This Page