[omd-users] OMD on SLES

Jaroslaw Nowak 0xfate at gmail.com
Mon Jun 30 17:23:08 CEST 2014


The apache2 way to enable modules is:
a2enmod env

then
service apache2 restart

but i dunno if your version is already supporting that, neither im sure
where (exactly) the module configs reside in SLES:
inside
/etc/

there will be either an httpd or apache2 folder. Beyond that there may
(depends on version) be an
mods-enabled & mods-aviavable folder

a2enmod now makes an softlink inside mods-enabled folder to the right
(env.load) module config inside /etc/apache2/mods-aviavable/

if a2enmod is not present on your system youll have to verify that

LoadModule env_module /usr/lib/apache2/modules/mod_env.so

is present, uncommented inside your apache config files(it should contain
somthing like module in its name). The Path is taken from debian though may
differ on sles.

im sorry i dont have an running SLES Host to verify the exact config files;
if you cant find the right one you may provide:
ls -la /etc/apache2/
and
ls -la /etc/apache2/*/
to my mail.

with regards
Fate


2014-06-30 16:56 GMT+02:00 B Timotheus <B.Timotheus at kanaan.org>:

> Hello Fate and all,
>
> I am loth to use the yast module. It says that the configuration has
> been changed and that running this might break the changes.
>
> Is there a file I can edit to make sure the module is being loaded?
>
> Regards,
> Timotheus
>
> >>> Jaroslaw Nowak <0xfate at gmail.com> 30.06.2014 16:52 >>>
> Hello you both;
> This made me suspecious:
> Syntax error on line 28 of /omd/sites/sitename/etc/
> >
> > apache/mode.conf:
> > Invalid command 'SetEnv', perhaps misspelled or defined by a module
> not
> > included in the server configuration
> >
> that reads like mod_env (apache2) is installed (as stated by "cat
> /etc/sysconfig/apache2 |grep MOD") but may be not active(?).
>
> As found by another mate (
>
> http://johannesluderschmidt.de/django-invalid-command-setenv-in-opensuse/291/
> )
> could you please verify that mod_env is installed and loaded by
> apache?
>
>
>    1. Start yast (from the command line)
>    2. Select “Network Services”
>    3. Select “HTTP Server”
>    4. Select “Server Modules”
>    5. Select “Network Services”
>    6. Scroll to “env”
>    7. Select “Toggle Status”
>    8. Select “Finish”
>
>
> with regards
> Fate
>
>
> 2014-06-30 16:21 GMT+02:00 B Timotheus <B.Timotheus at kanaan.org>:
>
> > Hi Timo (Maybe we are related? :-)
> >
> > I ran the Apache restart:
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > HOST:/opt/omd/apache # rcapache2 restart
> > Syntax error on line 28 of /omd/sites/sitename/etc/apache/mode.conf:
> > Invalid command 'SetEnv', perhaps misspelled or defined by a module
> not
> > included in the server configuration
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Here is what the conf file looks like. Line 28 is the first SetEnv
> line.
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > HOST:/opt/omd/apache # vi /omd/sites/sitename/etc/apache/mode.conf
> >
> > <IfModule mod_proxy_http.c>
> >   ProxyRequests Off
> >   ProxyPreserveHost On
> >
> >   # Include file created by 'omd config', which
> >   # sets the TCP port of the site local webserver
> >   Include /omd/sites/sitename/etc/apache/proxy-port.conf
> > </IfModule>
> >
> > <IfModule !mod_proxy_http.c>
> >   Alias /sitename /omd/sites/sitename
> >   <Directory /omd/sites/sitename>
> >    Allow from all
> >   </Directory>
> > </IfModule>
> >
> > <Location /sitename>
> >   # Set site specific environment
> >   SetEnv OMD_SITE sitename
> >   SetEnv OMD_ROOT /omd/sites/sitename
> >   SetEnv OMD_MODE own
> > </Location>
> >                                                               31,8
> >  Bot
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > I believe that I changed the Allow directive from none to all last
> week.
> > But I have started over a couple of time and I am not sure if this is
> the
> > version that I manipulated. I was getting some strange content in
> this
> > file. Lines that were part of an error message were in the middle of
> the
> > Directory section and the Location section. I deleted these.
> >
> > The results are the same. No surprise there. Also when running
> Firefox on
> > the server and pointing it at localhost.
> >
> > Best regards,
> > Timotheus
> >
> > >>> Timo Scheller <timo.scheller at hiz-saarland.de> 30.06.2014 14:52
> >>>
> > Hi Timotheus,
> >
> > ----- Original Message -----
> > > From: "B Timotheus" <B.Timotheus at kanaan.org>
> > > To: omd-users at lists.mathias-kettner.de
> > > Sent: Monday, June 30, 2014 2:00:37 PM
> > > Subject: Re: [omd-users] OMD on SLES
> > >
> > > Hello Timo,
> > >
> > > thanks for the welcome and thank you for going after this with me.
> > >
> > > Here are the results:
> > >
> > > HOST:/etc/apache2/conf.d # ls -la zzz*
> > > lrwxrwxrwx 1 root root 43 Jun 28 09:50 zzz_omd.conf ->
> > > /omd/versions/default/share/omd/apache.conf
> > >
> > > HOST:/etc/apache2/conf.d # cat zzz_omd.conf
> > > # Include Apache configuration of OMD sites
> > > Include /omd/apache/*.conf
> > >
> > > HOST:/etc/apache2/vhosts.d # ls
> > > vhost-ssl.conf  vhost-ssl.template  vhost.template
> > >
> > > HOST:/etc/apache2/vhosts.d # cd ..
> > >
> > > HOST:/etc/apache2 # ls *.conf
> > > default-server.conf          mod_info.conf
> mod_userdir.conf
> > > errors.conf                  mod_log_config.conf
> > > mod_usertrack.conf
> > > httpd.conf                   mod_mime-defaults.conf
> > > server-tuning.conf
> > > listen.conf                  mod_reqtimeout.conf
> ssl-global.conf
> > > mod_autoindex-defaults.conf  mod_status.conf         uid.conf
> > >
> > > HOST:/opt/omd/apache # ll
> > > total 4
> > > -rw-r--r-- 1 root root 53 Jun 28 09:50 kanaan_check.conf
> > >
> > > HOST:/etc/apache2 # su - sitename
> > > OMD[sitename]:~$ omd config show
> > > APACHE_MODE: own
> > > APACHE_TCP_ADDR: 127.0.0.1
> > > APACHE_TCP_PORT: 5000
> > > ...
> > >
> > > You had a different port number. Is that critical?
> > nope. With each new site, new portnumber. Thats normal. Nothing to
> worry.
> >
> > So it seems right. At least from this point.
> > Just to be clear and not missing anything.
> >
> > - After installing OMD and configuring one site, you happen to have
> > stopped and started the
> > apache2 system-wide with
> > --> rc2apache2 stop|start ?
> >
> > - You have checked, that the apache inside the omd site is running
> with
> > OMD[SITENAME]:~$ omd status
> > ....
> > apache:         running
> > ....
> > -----------------------
> > Overall state:  running
> >
> > and if not please do
> > omd start (inside the SITE)
> >
> >
> > >
> > > Thanks again,
> > > Timotheus
> > >
> > > >>> Timo Scheller <timo.scheller at hiz-saarland.de> 30.06.2014 12:45
> >>>
> > > Hi Timotheus,
> > >
> > > ----- Original Message -----
> > > > From: "B Timotheus" <B.Timotheus at kanaan.org>
> > > > To: omd-users at lists.mathias-kettner.de
> > > > Sent: Monday, June 30, 2014 11:57:49 AM
> > > > Subject: Re: [omd-users] OMD on SLES
> > > >
> > > > Hello Timo,
> > > >
> > > > Yes, the proxy and proxy_http modules are in the list.
> > > OK, that is good.
> > >
> > > >
> > > > I am running SLES 11.3.
> > > Also OK.
> > >
> > > >
> > > > I am also running Novell's SMT and a seperate Nagios installation
> on
> > > > this server. I hope there is not conflict there.
> > > Nope, we use SMT too. But no Nagios-Install on the same server.
> But
> > > that also
> > > shouldn`t be your problem.
> > >
> > > >
> > > > When I run "omd start sitename" it claims to start without
> errors.
> > > But
> > > > when I point Firefox at http://servername/sitename/ it gives me
> an
> > > error
> > > > 404.
> > > >
> > > > Looking in /var/log/Apache2/error.log I see
> > > > [Mon Jun 30 11:54:27 2014] [error] [client 10.1.100.14] File
> does
> > > not
> > > > exist: /srv/www/htdocs/sitename
> > > >
> > > > Obviously it should not be looking there, but I do not know how
> to
> > > tell
> > > > Apache where to look.
> > > >
> > > > Sorry to be so ignorant. When I get a couple of projects finished
> I
> > > > want to get a book on Apache become a bit more competent.
> > > First, your welcome. ;-) Second, a bit understanding of how apache
> > > works
> > > is always a win. ;-)
> > >
> > > So just let us look if you have this too:
> > > HOST:/etc/apache2/conf.d # ls -la zzz*
> > > zzz_omd.conf -> /omd/versions/default/share/omd/apache.conf
> > >
> > > HOST:/etc/apache2/conf.d # cat zzz_omd.conf
> > > # Include Apache configuration of OMD sites
> > > Include /omd/apache/*.conf
> > >
> > > Ans please have a look in
> > > HOST:/etc/apache2/vhosts.d/
> > > if there is anything about virtual hosts.
> > >
> > > And also check, if /omd/apache/*.conf are present.
> > >
> > >
> > > Then go into your site (su - SITENAME) an show your config
> > > omd config show
> > > OMD[SITENAME]:~$ omd config show
> > > APACHE_MODE: own
> > > APACHE_TCP_ADDR: 127.0.0.1
> > > APACHE_TCP_PORT: 5019
> > >
> > > This musst be there.
> >
> >
> > --
> >
> > Best
> > Timo
> > _______________________________________________
> > omd-users mailing list
> > omd-users at lists.mathias-kettner.de
> > http://lists.mathias-kettner.de/mailman/listinfo/omd-users
> >
> >
>
>
>
> _______________________________________________
> omd-users mailing list
> omd-users at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/omd-users/attachments/20140630/8e2ecd33/attachment.html>


More information about the omd-users mailing list