Glpi: HTTP_REFERER.

Created on 5 May 2017  路  7Comments  路  Source: glpi-project/glpi

Hello,

after step 1 (database access) I get redirected and immediately encounter the following error page:
None or Invalid host in HTTP_REFERER. Reload previous page before doing action again.

i do it on Winginx, PHP ver 5.4.45

Most helpful comment

nginx on windows is not stable...

in your nginx conf, you need add:

fastcgi_param  SERVER_NAME      $host;

All 7 comments

nginx on windows is not stable...

in your nginx conf, you need add:

fastcgi_param  SERVER_NAME      $host;

**here is my nginx.conf

can you please help, where i must add this line**

`

user nobody;

worker_processes 1;

error_log logs/error.log;

error_log logs/error.log notice;

error_log logs/error.log info;

pid temp/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  logs/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

client_max_body_size 55m;

#gzip  on;

scgi_temp_path  temp/uwsgi_temp 1 2;
uwsgi_temp_path  temp/uwsgi_temp 1 2;

fastcgi_connect_timeout 1;


server {
    listen   127.0.0.1:80;

    root home/localhost/public_html;
    index index.php index.html;

    log_not_found off;
    charset utf-8;

    access_log  logs/access.log  main;

    location ~ /\. {deny all;}

    location / {

        if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
            root home/$2/public_html;
            access_log  logs/$2-access.log  main;
        }

    }

    location ~ \.php$ {

        if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
            root home/$2/public_html;
            access_log  logs/$2-access.log  main;
        }

        if (!-e $document_root$document_uri){return 404;}
        fastcgi_pass localhost:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        include fastcgi_params;

    }
}

server {
    listen 127.0.0.1:443;
    include ssl.conf;

    root home/localhost/public_html;
    index index.php index.html;

    log_not_found off;
    charset utf-8;

    access_log  logs/access.log  main;

    location ~ /\. {deny all;}

    location / {

        if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
            root home/$2/public_html;
            access_log  logs/$2-access.log  main;
        }

    }

    location ~ \.php$ {

        if ($host ~ ^(www\.)?([a-z0-9\-\.]+)$){
            root home/$2/public_html;
            access_log  logs/$2-access.log  main;
        }

        if (!-e $document_root$document_uri){return 404;}
        fastcgi_pass localhost:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        include fastcgi_params;

    }
}


include tools-*.conf;

include vhosts/*.conf;

}
`

The line before the include fastcgi_params;

It needs to be done in 2 places?

Did as you said, but the error is still the same

Piccy.info - Free Image Hosting

This tracker is reated to GLPI issues, not nginx ones... Please use forums for support; and maybe ask to the nginx community to get you have this webserver up and running.

change server_name to your server ip(glpi address : http://192.168.2.55/glpi/) in nginx.conf like below:
server_name 192.168.2.55;
OR
change server_name to your domain name(glpi address : http://www.example.com/glpi) in nginx.conf like below:
server_name www.example.com;

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zoriax picture zoriax  路  4Comments

trasher picture trasher  路  4Comments

trasher picture trasher  路  6Comments

mab18 picture mab18  路  5Comments

ymfinidori picture ymfinidori  路  5Comments