Yast http configuration manual

Hi
I will try to be clear ? with my french

I install ocs on my web server
there is not package so i should install manually the web service
I have a configuration file ocsreports.conf and i copy it under /etc/apache2 config directory

with it i can run the ocsreports without problem

but when i try to modify the file with yast/http , my ocsreports.conf file is not read , more yast deleted it !!
If a make a configuration file with yast/http , and after mofify it manually ; again yast remove it ?!!

so where yast put in memory his file ?? I would like to be able to modify my file with yast
regards

You’ll have to be specific what is the ocs application you’re running.
I’m speculating that it’s ocsinventory, but you’ll have to verify.

TSU

Hi
It is ocsinventory
regards

I made a test
i write a con file named pipi.conf and inside this file i have wrote the instruction :

Servername caca

if i launch yast , i saw a vhost name caca, that’s mean yast read the conf file and if the servername instruction is not present it did’nt read the conf file

but !! if i put this in my ocsreports.conf file , the web instance does’nt work
there is something wrong with the alias


<Virtualhost *>
# ServerName /ocsreports
# ne peut mettre servername sinon plante ?? 
 ErrorLog /var/log/apache2/ocsreports.log
 Alias /ocsreports /srv/www/htdocs//ocsreports
 DocumentRoot /srv/www/htdocs/ocsreports
 HostnameLookups Off
 UseCanonicalName On
 ServerAdmin bga.lambert@free.fr

<Directory /srv/www/htdocs//ocsreports>


I am not sure I understand all you are doing, but I have my aliases written like:

Alias /ocsreports/ "/srv/www/htdocs//ocsreports/"

I know the comment allows you to omit those two end /es, but you could try.
(and why the double //)?

Hi forget the // it is a mistake on my paste/copy

i think i did"nt explain my problem.
simply i try to said :
why i did’nt see and can modif with yast this vhost ? the ocsreport.conf is in the good place
It look like i have all the rights instructions but yast does’nt see the conf file ???
is my explanation correct ?

and as i said if a copy a xxxx.conf on the vhosts directory yast saw directly the file !! but not my ocsreports.conf ?? !!!

BTW: The only configuration file I ever wrote:

**erlangen:~ #** cat /etc/apache2/conf.d/Albums.conf    

# location of local albums 
Alias "/Albums" "/home/Albums/jAlbums/" 

# grant access  
<Directory "/home/Albums/jAlbums/">
    Require all granted 
    Options Indexes FollowSymLinks 
</Directory> 
**erlangen:~ #**


Stuff shows up at: http://erlangen/Albums Never thought of using ocs-inventory.

I think you dont understand my problem
my ocsreport.conf work fine !! no web problem, everything are working
BUT

i am obliged to edit and modif the file with a editor and after start manually apache : systemctl restart apache2 …

I a got with Yast/http i did’nt see the vhost directory the ocsreports , that’s mean yast does’nt read the conf and if i quit yast with save !! IT DELETED my ocsreport.conf !!
So what is wrong in my file ??
what line yast is looking for to read the conf ?

best regards

I give you again the beginning


<Virtualhost *>

# ne peut mettre servername sinon plante  
# si il fallait modifier le fichier hosts
 ErrorLog /var/log/apache2/ocsreports.log

 DocumentRoot /srv/www/htdocs/ocsreports
 ServerAlias /ocsreports /srv/www/htdocs/ocsreports
 ServerName ocsreports
 HostnameLookups Off
 UseCanonicalName On
 ServerAdmin bga.lambert@free.fr

<Directory /srv/www/htdocs/ocsreports>

and this begin is the “same” as other conf file ???

Does #1 work? Why would you do #2?

HI

as i said #1 work very fine

2 because it is an easy way , no syntax error with yast , i did that since the beginning

regards

Great!

Put your stuff in a file which does not yet exist, as I did: /etc/apache2/conf.d/Albums.conf

The end of the storie

I created a conf file with the standard directives, severname , directory … with yast /http

After that i copy part of the final conf file from ocsreports and test at each time if i can see and modified with yast the configuration

at the end i got a conf file witch is working and saw by yast
what i believe some instruction are not well read by yast for exemple in section directory this line arent read


<IfModule mod_authz_core.c>
        # Apache 2.4
Require all granted
  </IfModule>
  <IfModule !mod_authz_core.c>
   Order deny,allow
   Allow from all
  </IfModule>


in yast i just see " _nil"

may be in the first tile when i made a copy/paste for all the file there was something wrong
regards

What contents? What path name?

After that i copy part of the final conf file from ocsreports
What content?

and test at each time if i can see and modified with yast the configuration
What module? What tab?

at the end i got a conf file witch is working and saw by yast
What?

what i believe some instruction are not well read by yast for exemple in section directory this line arent read

# Apache 2.4 Require all granted Order deny,allow Allow from all

Why do you believe that?

in yast i just see " _nil"
Where? Which tab?

I am puzzled. I can’t see what you are doing. You need to show details.

https://forums.opensuse.org/showthread.php/547520-Yast-http-configuration-manual

FYI -
If you want to try installing ocsinventory on LEAP 15.2,

I’ve created a gist (script code)

https://gist.github.com/putztzu/2aa95ae5f4989e83e963daad4e1e9cdc

Should be self-explanatory.
You can copy and paste the code into a “su” console or save as a script file and make it executable.
Installs all ocsinventory prerequisites and initial configurations.
Launches the ocsinventory setup, I’ve been able to walk almost all the way through until Perl files are copied to the ocsinventory directory, for some unknown reason it fails without an obvious reason (complains about no file or directory, but the directory exists and there shouldn’t be a permissions problem). Since it’s an ocsinventory issue, I’m considering it out of scope of what I’m doing but others are welcome to see what they can do with it(maybe the error won’t even show up for others).

OCSinventory is an interesting app.
I think I installed this long ago (maybe 10 years ago?) and it was pretty good at collecting and reporting the assets in your network… But I don’t remember the install being this difficult or complex. The script I created should hopefully remove all the complexity setting up on LEAP leaving only the ocsinventory setup itself.

If there is a demand to modify the script to support other versions of openSUSE or Tumbleweed, I can do that, too…

TSU