Discover Centmin Mod today
Register Now

Amazon SES dashboard Nginx PHP-FPM configuration?

Discussion in 'Other Web Apps usage' started by MaximilianKohler, Mar 31, 2024.

  1. MaximilianKohler

    MaximilianKohler Member

    200
    6
    18
    Jun 23, 2023
    Ratings:
    +33
    Local Time:
    5:05 PM
    I'm trying to install this Amazon SES dashboard GitHub - Nikeev/sesdashboard: Analytics and activity tracking dashboard for AWS Simple Email Service.

    I'm having an issue where the index.php doesn't seem to load/run properly sesdashboard/issues/70. The author said
    I read through
    * Centmin Mod LEMP Stack Install Nginx on CentOS
    * PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS
    * Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS

    The only thing that seemed related was the open_basedir section of the 3rd link. But I looked in
    Code:
    /usr/local/nginx/conf/php.conf
    and the line is already commented out by default.

    I tried phpalt.conf + nprestart and that didn't seem to be any different.


    Looking at the example config sesdashboard/blob/master/phpdocker/nginx/nginx.conf, the important lines seem to be:
    Code:
    index index.php;
    
        if (!-e $request_filename) {
            rewrite ^.*$ /index.php last;
        }
    
        location ~ \.php$ {
            fastcgi_pass php-fpm:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
            fastcgi_buffers 16 16k;
            fastcgi_buffer_size 32k;
            include fastcgi_params;
        }
    
    I tried pasting in all those lines in the vhost nginx config under the 443 section, but it failed:
    Code:
    nprestart
    Redirecting to /bin/systemctl restart nginx.service
    Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
    Redirecting to /bin/systemctl restart php-fpm.service
    
    I was going to make a copy of php.conf and edit it, but they look pretty similar already. So I added this to the nginx config below the 443 section:
    Code:
        if (!-e $request_filename) {
            rewrite ^.*$ /index.php last;
        }
    And that seemed to work.

    I guess the index index.php; line is unnecessary, and the location ~ \.php$ { section is already adequate in php.conf?
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,606
    12,225
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,794
    Local Time:
    11:05 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    That would be the equivalent of nginx requiring a custom try_files directive for Amazon SES dashboard setup or you can continue to use that specific config