phpipam / phpipam

phpipam development repository
https://phpipam.net
2.23k stars 733 forks source link

New install - unable to log in #1871

Closed dsgnr closed 6 years ago

dsgnr commented 6 years ago

Hi there,

I've successfully configured a new install of PHPIpam on a Centos 7 box with the following packages: Nginx PHP 7.1 MariaDB 10.2

I have tried to use the generic Nginx configuration supplied on the documentation but I simply got a blank page with no errors reported.

I have managed to get it working by specifying the fastcgi_param but unfortunately, I am unable to log in. The web UI says the login was successful, I get the spinning icon then the page just refreshes to the login page again.

I'm pretty confident this will be an issue with the Nginx configuration and was wondering if you could please advise?

Here's my vhost configuration:

server {
        server_name ipam.example.com;
        listen 443 http2 ssl;
        include /etc/nginx/snippets/ssl-params.conf;
        root /var/www/phpipam;
        index index.php index.html index.htm;
        access_log /var/log/nginx/ipam.example.com.access.log;
        error_log /var/log/nginx/ipam.example.com.error.log;

    # phpipam
    location / {
        try_files $uri $uri/ /index.php;
        index index.php;
    }

    # phpipam - api
    location /api/ {
        try_files $uri $uri/ /index.php;
    }

    # php-fpm
    location ~ \.php$ {
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_pass   unix:/var/run/php-fpm/php7.1-fpm.sock;
        fastcgi_index  index.php;
        try_files      $uri $uri/ index.php = 404;
        include        fastcgi_params;
    }
}

If you could please help that would be fantastic!

GaryAllan commented 6 years ago

Hi, I've seen the successful login issue with JavaScript disabled (noscript plugin).

Thread #41 includes nginx examples.

dsgnr commented 6 years ago

Thanks. It looked to be an issue with FPM sessions on this occasion. Closing issue :)