teqneers / Greyface

Greyface is an open source AJAX based web interface to SQLGrey, a greylisting policy daemon for the Postfix MTA. View and manipulate live greylisting data through an easy-to-use interface or submit new greylisting data.
MIT License
5 stars 1 forks source link

nginx + greyface #83

Open piwats opened 9 years ago

piwats commented 9 years ago

Hi Sven,

I have decided to give nginx a try since it gives better performance under a higher concurrent load then apache.

nginx might be not so easy to setup as apache, but still... this is how I configure it:

I like to have greyface under /grey

location /grey/ {
            alias /var/www/mail/greyface/htdocs/;
            index index.php;
    #autoindex on;

            location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php$)(/.+)$;
                    include /etc/nginx/fastcgi.conf;
                    fastcgi_pass unix:/run/php-fpm.socket;
                    fastcgi_index index.php;
            }
    }

Unfortunately, greyface refuses to work - I have no idea why...

Do you have any ideas?

Kind Regards, -Paul

svencc commented 9 years ago

Hi Paul,

unfortunately I didn´t used nginx at any time.

I can´t give you any tips.

What exactly does happen if you try to reach the application with your browser? Any error Messages?

Maybe you can activate error logging and find any further Information in the error log.

Without any information I can´t help you at all ☹

Best Regards

sven

Von: piwats Gesendet: ‎Montag‎, ‎21‎. ‎Juli‎ ‎2014 ‎13‎:‎29 An: teqneers/Greyface

Hi Sven,

I have decided to give nginx a try since it gives better performance under a higher concurrent load then apache.

nginx might be not so easy to setup as apache, but still... this is how I configure it:

I like to have greyface under /grey location /grey/ { alias /var/www/mail/greyface/htdocs/; index index.php;

autoindex on;

        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php$)(/.+)$;
                include /etc/nginx/fastcgi.conf;
                fastcgi_pass unix:/run/php-fpm.socket;
                fastcgi_index index.php;
        }
}

Unfortunately, greyface refuses to work - I have no idea why...

Do you have any ideas?

Kind Regards, -Paul

— Reply to this email directly or view it on GitHub.

piwats commented 9 years ago

Hello Sven,

thank you very much for your reply.

It could be you had any information on this. I will try to figure this out myself first. nginx might be a little bit harder to setup then apache, so configuration errors may occur...

I will share any results of course :)

-Paul

piwats commented 9 years ago

That should be something like this - now working ;)

    ###
    ###  GREYFACE
    ###
    location /grey/ {
            alias /var/www/mail/greyface/htdocs/;
            index index.php;
    }

    location ~ /grey/.*\.php$ {
            if ($fastcgi_script_name ~ /grey(/.*\.php)$) {
                    set $valid_fastcgi_script_name $1;
            }
            fastcgi_pass unix:/run/php-fpm.socket;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME /var/www/mail/greyface/htdocs$valid_fastcgi_script_name;
            include fastcgi_params;
    }

-Paul