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

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

Configurer plusieurs Serveur Ocs sur un serveur

Bonjour à tous,

J'ai un petit souci avec Ocs (dernière version) sur mon serveur centos 6 que je viens d'installer. Mon but serait d'avoir plusieurs Ocs sur un serveur accessible via différentes url. J'ai cru lire que c'était possible en configurant des virtualhost.

Pour mettre ceci en place j'ai configuré mon fichier "ocsinventory-reports.conf" avec deux virtualhost.

L'accès aux sites fonctionne bien en https mais je bloque sur les remontées d'inventaire. Je n'avais pas pensé aux certificats avant de me lancer là-dedans ... Le Cn du certificat est ocs-societe1.domaine.com

Sur mon pc j'obtiens le log suivant (J'ai supprimé les lignes inventory) :

Starting OCS Inventory NG Agent on Friday, March 06, 2015 16:00:50.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.1
AGENT => Loading plug-in(s)
DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
DLL PLUGIN => 0 DLL Plug-in(s) succesfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
COM PROVIDER => Loading Communication Provider <C:\Program Files (x86)\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.1>
AGENT => Sending Prolog
DID_CHECK => Read DeviceID <X> and MACs <XX> in file <ocsinventory.dat>
COM SERVER => Initializing cURL library for sendRequest
COM SERVER => Using cURL without server authentication
COM SERVER => Disabling cURL proxy support
COM SERVER => Enabling cURL SSL server validation support using CA Bundle <cacert.pem>
COM SERVER => Sending HTTP Post request to URL <https://ocs-societe1.domaine.com/ocsinventory>
COM SERVER => HTTP Post response received <HTTP Status Code #200>
COM SERVER => Cleaning cURL library
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
AGENT => Prolog Frequency set to 24 hour(s)
AGENT => Inventory required
AGENT => Launching hardware and software checks
AGENT => Sending Inventory
COM SERVER => Initializing cURL library for sendRequest
COM SERVER => Using cURL without server authentication
COM SERVER => Disabling cURL proxy support
COM SERVER => Enabling cURL SSL server validation support using CA Bundle <cacert.pem>
COM SERVER => Sending HTTP Post request to URL <https://ocs-societe1.domaine.com/ocsinventory>
COM SERVER => HTTP Post response received <HTTP Status Code #200>
COM SERVER => Cleaning cURL library
AGENT => Inventory successfully sent
INVENTORY => Writing new inventory state
AGENT =>  Communication Server ask for Package Download
DOWNLOAD => Package history file successfully cleaned for duplicate IDs
DOWNLOAD => Download disabled by server
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:19.

Je ne vois pas d’erreurs particulières mais je ne retrouve pas mon poste dans l'inventaire. Vous pourriez m'aider ?

Merci d'avance à tous.

 

in OCS Inventory NG server for Unix by (160 points)
retagged by

1 Answer

0 votes

Ci-joint ma conf apache:

NameVirtualHost *:443

<VirtualHost *:443>

SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

ServerName ocs-societe1.domaine.com
Alias /ocsreports /usr/share/ocsinventory-reports-societe1/ocsreports
<Directory /usr/share/ocsinventory-reports-societe1/ocsreports
>
Order deny,allow
Allow from all
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride Options
AddType application/x-httpd-php .php
php_flag file_uploads           on
php_value post_max_size         101m
php_value upload_max_filesize   100m
php_flag magic_quotes_gpc      off
</Directory>

Alias /download /var/lib/ocsinventory-reports-societe1/download
Alias /snmp /var/lib/ocsinventory-reports-societe1/snmp

</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

ServerName ocs-societe2.domaine.com
Alias /ocsreports /usr/share/ocsinventory-reports-societe2/ocsreports
<Directory /usr/share/ocsinventory-reports-societe2/ocsreports>

# By default, users can use console from everywhere
Order deny,allow
Allow from all
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride Options
AddType application/x-httpd-php .php
php_flag file_uploads           on
php_value post_max_size         101m
php_value upload_max_filesize   100m
php_flag magic_quotes_gpc      off
</Directory>

Alias /download /var/lib/ocsinventory-reports-societe2/download
Alias /snmp /var/lib/ocsinventory-reports-societe2/snmp

</VirtualHost>

by (160 points)
 
Powered by Question2Answer
...