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.12.3 available

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

How to configure AuthRequired parameter in server?

Hello!
I would be very grateful if someone would explain where to configure AuthRequired parameter in OCS Inventory server?
in OCS Inventory NG server for Unix by (240 points)
edited by

2 Answers

0 votes
can you try this ?

https://ask.ocsinventory-ng.org/2153/download-directory-protection-with-http-basic-auth

It should work similar on newer servers i hope

Kind regards
by (24.7k points)
0 votes
Thank You very much for respons! Your answer helped me take a closer look at the configuration file. AuthRequired functionality configuration was easier than I thought!
Here is instruction (OCS Inventory Server release 2.12.3, Ubuntu 24.04 LTS):

1. Generate Apache user (ocsagent for this example) and password:
    sudo htpasswd -c /etc/apache2/.htpasswd ocsagent

2. Edit z-ocsinventory-server.conf configuration file in  section: <Location /ocsinventory>

    Comment:

     Require all granted
     allow from all

    Uncomment the following lines:

    AuthType Basic
    AuthName "OCS Inventory agent area"
    require valid-user

     Change:

     AuthUserFile "APACHE_AUTH_USER_FILE"
     to:
     AuthUserFile "/etc/apache2/.htpasswd"

3. Apache2 restart:
   service apache2 restart

I was blind, I didn't read the comments contained in the configuration files. Those files are described very well.
If I missing something or write something wrong please correct me.
Kind regards
by (240 points)
edited by
 
Powered by Question2Answer
...