Ad Widget

Collapse

Error No matching DirectoryIndex (index.html,index.php), gives http error 412

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jlenoci
    Junior Member
    • Jan 2024
    • 25

    #1

    Error No matching DirectoryIndex (index.html,index.php), gives http error 412


    Hello guys, I'm trying to access the address of my Zabbix API via the web, and I'm getting an HTTP 412 error. In the Zabbix logs, I see this error: "Error: No matching DirectoryIndex (index.html, index.php), gives HTTP error 412." I've noticed that this might be due to something missing in the httpd.conf file, but I don't want to make any changes until someone who knows or has resolved this error confirms or provides an alternative solution.
  • Answer selected by jlenoci at 26-02-2024, 13:29.
    markfree
    Senior Member
    • Apr 2019
    • 868

    It looks like a permission error.
    You could check the API user permissions as well as the post request header and token.

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #2
      You probably need to provide what version of Zabbix you're using on your server and what URL you were trying to connect to.

      At least with the 6.0 LTS release my site is using, accessing the API always requests the same specific file, so there would be no reason why Apache httpd would need to look for a DirectoryIndex.

      Comment

      • jlenoci
        Junior Member
        • Jan 2024
        • 25

        #3
        Hello, im using Zabbix version 5.4.0, the URL is like this (the API URL) https://miserver/api_jsonrpc.php
        What u mean with providing the version of zabbix to my server and the URL?
        Thanks!!!

        Comment

      • jlenoci
        Junior Member
        • Jan 2024
        • 25

        #4
        No, that URL is not for my version, the one that work is https://miserver/api_jsonrpc.php, because i do API request via postman and powerbi, and i get response, the problem is that i have the error http 412 when i try to acces via web

        Comment

        • markfree
          Senior Member
          • Apr 2019
          • 868

          #5
          It looks like a permission error.
          You could check the API user permissions as well as the post request header and token.

          Comment

          Working...