Ad Widget

Collapse

how to resolve 404 Not Found page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fun_9990
    Junior Member
    • May 2017
    • 13

    #1

    how to resolve 404 Not Found page

    i started zappix server successfully
    but when i want to go to first page i see this error message
    my web server is nginx

    404 Not Found
    nginx

    i am waiting for forum users help messages

    thanks ahead
  • JcDuss
    Junior Member
    • Aug 2015
    • 9

    #2
    What's in your nginx logs ?

    Does zabbix folder get enough permission for nginx daemon user's to browse it ?

    what is your nginx conf ?

    Comment

    • fun_9990
      Junior Member
      • May 2017
      • 13

      #3
      thank you so much for your answer
      this is my error log message :
      [error] 31924#31924: *755 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip, server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31923#31923: *782 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip, server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *795 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *795 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip,server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"
      [error] 31924#31924: *919 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ip, server: hostname, request: "GET /zabbix HTTP/1.1", host: "ip"

      Comment

      • fun_9990
        Junior Member
        • May 2017
        • 13

        #4
        please see my log in next post
        Last edited by fun_9990; 23-05-2017, 01:19.

        Comment

        • fun_9990
          Junior Member
          • May 2017
          • 13

          #5
          this is my log message
          please see and say me what can i do

          [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ,server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ,server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ,server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *756 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ,server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31923#31923: *782 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: , server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *795 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ,server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *795 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: ,server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *919 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client: , server: , request: "GET /zabbix HTTP/1.1", host: ""
          [error] 31924#31924: *1017 openat() "/var/www/html/zabbix" failed (2: No such file or directory), client:, server: , request: "GET /zabbix HTTP/1.1", host: ""

          maybe with mkdir new directory/file over there , we get a new error message , because i think this route is for Apache , isn't it ?
          Last edited by fun_9990; 22-05-2017, 22:02.

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #6
            How did you install Zabbix?

            You seem to be configured to access /var/www/html/zabbix in the log,
            did you place the Zabbix web frontend files in that directory?

            Please configure Nginx to access the directory where the Zabbix Web frontend files are located.
            Setting of cooperation between Nginx and PHP is also necessary.

            Comment

            • fun_9990
              Junior Member
              • May 2017
              • 13

              #7
              nothing over there !! -->> /var/www/html/zabbix
              my installation method is in :
              After Install All Services and Configure Yum Repository and Install Zabbix Server with MySQL
              yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway
              and Create Zabbix MySQL Database
              i used this commands
              cd /usr/share/doc/zabbix-server-mysql-3.0.9/
              zcat create.sql.gz | mysql -uzabbix -p zabbixdb
              service zabbix-server start
              service zabbix-agent start
              and here is my configuration files
              nano /etc/zabbix/zabbix_agentd.conf
              nano /etc/zabbix/zabbix_server.conf
              now what is exact Settings in Nginx to Zabbix ?
              Last edited by fun_9990; 23-05-2017, 14:52.

              Comment

              • JcDuss
                Junior Member
                • Aug 2015
                • 9

                #8
                Hello,

                If there is nothing in /var/www/html/zabbix
                then Nginx has nothing to display. Logic ! => 404 error !

                Try to find the zabbix index.php file in your server and point the nginx conf to the folder of this file.


                Did you read this post ?


                If you are not friendly with Web servers, why don't you give a try with a zabbix appliances ?
                It should be good start for small infrastructures.

                Comment

                • fun_9990
                  Junior Member
                  • May 2017
                  • 13

                  #9
                  this is here

                  Code:
                  /usr/share/zabbix
                  but now which file we must edit in nginx folder ?
                  in this topic we saw 3 code

                  which one of these i can use in nginx goal file ?

                  Comment

                  • Atsushi
                    Senior Member
                    • Aug 2013
                    • 2028

                    #10
                    I do not know the distribution or version you are using.
                    And how did you install nginx?
                    What is the version?

                    We can not support it if there is no detailed information on the environment.
                    The basic settings are listed on the referenced page.

                    If you do not understand what each file is for,
                    it is recommended to use Apache HTTP Server (httpd) instead of nginx.
                    If it is a combination with httpd, you can start operation by setting the timezone.

                    Comment

                    • Atsushi
                      Senior Member
                      • Aug 2013
                      • 2028

                      #11
                      For example, if you configure with Zabbix LLC package on RHEL 7, there are several steps to switch from httpd to nginx.

                      By default, Zabbix's Web Frontend is designed to work with httpd.
                      When switching to nginx, the operating environment of PHP must also be set separately.

                      It is also necessary to change the permissions of each file depending on the OS on which OS you run these services.

                      The following example shows the procedure when Zabbix 3.0.9 is built on CentOS 7.
                      nginx uses epel's package. (version 1.10.2)
                      For linking nginx and PHP, use php-fpm.
                      It is assumed that nginx and php-fpm are started by apache user.
                      If you are running as an nginx user, permission on various files is required.

                      This is only an example.
                      This is necessary to review various settings according to requirements.

                      Command lines:

                      Code:
                      # yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
                      # yum install zabbix-agent zabbix-server-mysql zabbix-web-mysql
                      # yum install mariadb-server
                      # vi /etc/my.cnf.d/server.cnf
                      # systemctl start mariadb
                      # systemctl enable mariadb
                      # mysql -uroot
                      mysql> create database zabbix character set utf8 collate utf8_bin;
                      mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password' ;
                      mysql> flush privileges;
                      mysql> exit
                      # zcat /usr/share/doc/zabbix-server-mysql-3.0.9/create.sql.gz | mysql -uroot zabbix
                      # vi /etc/zabbix/zabbix_server.conf
                      # yum install epel-release
                      # yum install nginx
                      # yum install php-fpm
                      # vi /etc/php.ini
                      # vi /etc/nginx/nginx.conf
                      # chown -R apache:apache /var/log/nginx/
                      # chown -R apache:apache /var/lib/nginx/
                      # ln -s /usr/share/zabbix /usr/share/nginx/html/zabbix
                      # vi /etc/nginx/conf.d/zabbix.conf
                      # vi /etc/nginx/fastcgi_params
                      # systemctl start zabbix-server
                      # systemctl start zabbix-agent
                      # systemctl start php-fpm
                      # systemctl start nginx
                      # systemctl enable zabbix-server
                      # systemctl enable zabbix-agent
                      # systemctl enable php-fpm
                      # systemctl enable nginx
                      # firewall-cmd --add-service=http --zone=public --permanent
                      # firewall-cmd --reload

                      Setting files:

                      /etc/my.cnf.d/server.cnf
                      Code:
                      [mysqld]
                      character-set-server = utf8
                      collation-server     = utf8_bin
                      skip-character-set-client-handshake
                      innodb_file_per_table
                      /etc/zabbix/zabbix_server.conf
                      Code:
                      DBPassword=password
                      /etc/php.ini
                      Code:
                      max_execution_time = 300
                      memory_limit = 128M
                      post_max_size = 16M
                      upload_max_filesize = 2M
                      max_input_time = 300
                      date.timezone = "Asia/Tokyo"
                      /etc/nginx/nginx.conf
                      Code:
                      user apache;
                      And, Comment out the sever section.

                      /etc/nginx/conf.d/zabbix.conf
                      Code:
                      server {
                          listen 80;
                          root /usr/share/nginx/html;
                          index index.html;
                          access_log /var/log/nginx/zabbix-access_log main;
                          error_log  /var/log/nginx/zabbix-error_log error;
                      
                          location /zabbix {
                              index index.php;
                          }
                      
                          location ~ \.php$ {
                              fastcgi_pass 127.0.0.1:9000;
                              fastcgi_index index.php;
                              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                              include fastcgi_params;
                          }
                      }
                      /etc/nginx/fastcgi_params
                      Code:
                      fastcgi_buffer_size 128k;
                      fastcgi_buffers 4 256k;
                      fastcgi_busy_buffers_size 256k;
                      fastcgi_temp_file_write_size 256k;
                      Last edited by Atsushi; 25-05-2017, 11:56.

                      Comment

                      • fun_9990
                        Junior Member
                        • May 2017
                        • 13

                        #12
                        Originally posted by Atsushi
                        I do not know the distribution or version you are using.
                        And how did you install nginx?
                        What is the version?

                        We can not support it if there is no detailed information on the environment.
                        The basic settings are listed on the referenced page.

                        If you do not understand what each file is for,
                        it is recommended to use Apache HTTP Server (httpd) instead of nginx.
                        If it is a combination with httpd, you can start operation by setting the timezone.
                        Code:
                        zabbix 3.0.9
                        Code:
                        centos 6.5
                        last version of nginx
                        nginx with directadmin
                        base files :
                        Code:
                        nano /usr/local/directadmin/custombuild/configure/nginx/conf/nginx.conf
                        nano /etc/nginx/nginx.conf
                        nginx configuration for every domain name :
                        Code:
                        nano /usr/local/directadmin/data/users/myhand/domains/domain.com.cust_nginx

                        Comment

                        • fun_9990
                          Junior Member
                          • May 2017
                          • 13

                          #13
                          Originally posted by Atsushi
                          .
                          .
                          .
                          thankyou
                          but your config is for Centos 7 version
                          for example in centos 6.* we dont have this file
                          Code:
                          nano  /etc/nginx/conf.d/zabbix.conf
                          overthere

                          Comment

                          • Atsushi
                            Senior Member
                            • Aug 2013
                            • 2028

                            #14
                            With CentOS 6 you can not use Zabbix 3.0 with standard PHP packages.
                            It is necessary to prepare PHP 5.4 or later.
                            Have you prepared an environment with PHP 5.4 or later?

                            for example in centos 6.* we dont have this file
                            Please create a new file.

                            Again, I can not recommend configuring with nginx for beginners.

                            Comment

                            • fun_9990
                              Junior Member
                              • May 2017
                              • 13

                              #15
                              Originally posted by Atsushi
                              With CentOS 6 you can not use Zabbix 3.0 with standard PHP packages.
                              It is necessary to prepare PHP 5.4 or later.
                              Have you prepared an environment with PHP 5.4 or later?


                              Please create a new file.

                              Again, I can not recommend configuring with nginx for beginners.
                              PHP 5.6.28 (cli) (built: Dec 1 2016 02:04:45)
                              where should i create new file ?

                              Comment

                              Working...