404 error on login with nginx

404 error in Nginx.

Note that, the Ezeelogin installation is under the directory named 'gate'


In the nginx conf location directive for the server section handling ezeelogin pages, add the following rewrite rule:

if (!-f $request_filename) { rewrite ^/gate/index.php/(.*)$ /gate/index.php?$1 last;


The modified conf looks like the following..

+++++++++++++++++++++++++++++++++++++++++++++++++++++++
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name 192.168.56.126;
rewrite_log on;
root /usr/share/nginx/html;
index index.php index.html;


if (!-f $request_filename) {
rewrite ^/gate/index.php/(.*)$ /gate/index.php?$1 last;
}
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


if you continue to have issues, enable error logging

set the following variables in your nginx config file

error_log /var/log/nginx/error.log notice;

and looks for the rewrite errors in the logs.

0 (0)
Article Rating (No Votes)
Rate this article
    Attached Files
    There are no attachments for this article.
    Related Articles RSS Feed
    Unable to connect to your database server using the provided settings.
    Viewed 7195 times since Thu, Jun 15, 2017
    Unable to login into cpanel/whm with one click
    Viewed 5663 times since Wed, Jun 14, 2017
    fatal: no matching mac found: unable to ssh due to strict cipher set for pci dss compliance on remote box
    Viewed 4882 times since Fri, Sep 1, 2017
    Jump server ip to be licensed?
    Viewed 2501 times since Thu, Jun 15, 2017
    vi editor not working , insert and delete not working in ssh
    Viewed 2537 times since Wed, Jun 14, 2017
    Blank page when clicking add server
    Viewed 1921 times since Wed, Aug 16, 2017
    reCaptcha images not loading
    Viewed 2875 times since Wed, Jun 14, 2017
    Unable to add server into Ezeelogin via webinterface. Password error, times out
    Viewed 1996 times since Wed, Jun 14, 2017
    ERROR db user: Incorrect datetime value: ’0000-00-00 00:00:00’ for column ’expiry’ at row 1
    Viewed 1281 times since Tue, Feb 12, 2019
    no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
    Viewed 4853 times since Tue, Jan 2, 2018