Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Auth on /ocsinventory not work

Have a problem with my new ocs server i can not activate basic auth for agent in /ocsinventory directory.

My os is Ubuntu 16.04

My ocs version are the 2.4

In the apache log  not view an error but the agent send data to my ocs server without authentication, is a problem for me with the ocs inventory server exposed on the internet.

My z-ocsinventory-server.conf is

<Location /ocsinventory>
        <IfModule mod_authz_core.c>
      # Apache 2.4
      Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
      # Apache 2.2
          order deny,allow
          allow from all
        </IfModule>
        # If you protect this area you have to deal with http_auth_* agent's parameters
        AuthType Basic
        AuthName "OCS Inventory agent area"
        AuthUserFile /etc/apache2/.htpasswd
        Require valid-user
        SetHandler perl-script
        PerlHandler Apache::Ocsinventory
  </Location>

Please help me ?
in OCS Inventory NG server for Unix by (260 points)
edited by

5 Answers

0 votes

Hi @albertovt

since version 2.4 of the OCS server, a file has been added :

/etc/apache2/conf-available/zz-ocsinventory-restapi.conf

Have you checked the content ?

Regards, Stéphane

by (32.6k points)
0 votes

Hi @Stéphane, this is the content of my conf-available folder

I dont find the file zz-ocs........

by (260 points)
0 votes
Hi,

in others directory ?

Regards, Stéphane
by (32.6k points)
0 votes

HiStéphane, i find in all folder in the server but not find the file zz-ocsinventory-restapi.conf

by (260 points)
0 votes
Hello, if you use Apache 2.4 corect config :

 <IfModule mod_authz_core.c>
      # Apache 2.4
<------>Require all denied
<------>AuthType Basic
<------>AuthBasicProvider file
<------>AuthUserFile /etc/httpd/.htpasswd
<------>AuthName "OCS Inventory agent area"
<------>require valid-user
    </IfModule>
by (140 points)
 
Powered by Question2Answer
...