[opensuse] Problem starting apache2
![](https://seccdn.libravatar.org/avatar/cabdbf4d350ab6a15265803acab1634d.jpg?s=120&d=mm&r=g)
I'm asking this here because its well out of my field of experience and expertise. I've always just set up Apache (and ownCloud) according the to the instructions and in the past its "just worked". I've never known enough about Apache to do tuning or play around with the various things like Tomcat or Struts. I just about know enough to look in the logs and I don't see anything there that gives me a clue to the failure modes. I've just run a 'zypper up' and it installed some updates to ownCloud 2015-07-03 08:44:49 <1> Mainbox(2218) [zypp] MediaCurl.cc(MediaCurl):459 MediaCurl::MediaCurl(http://ftp.halifax.rwth-aachen.de/opensuse/repositories/isv:/ownCloud:/commu..., ) and more lie that for other components of ownCloud. I don't see anything in the logs that was a change to Apache alone. However, apache isn't restarting. # /usr/sbin/start_apache2 AH00526: Syntax error on line 10 of /etc/apache2/conf.d/owncloud.conf: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration. That file reads # nl conf.d/owncloud.conf 1 Alias /owncloud "/srv/www/htdocs/owncloud/" 2 <Directory "/srv/www/htdocs/owncloud"> 3 Options +FollowSymLinks 4 AllowOverride All 5 <IfModule mod_dav.c> 6 Dav off 7 </IfModule> 8 SetEnv HOME /srv/www/htdocs/owncloud 9 SetEnv HTTP_HOME /srv/www/htdocs/owncloud 10 </Directory> 11 <Directory "/srv/www/htdocs/owncloud/data/"> 12 # just in case if .htaccess gets disabled 13 Require all denied 14 </Directory> When I look at the diff between that and the rpmsave I see that lines 5-9 have been introduced. I'm unclear from the docs if I should have a mod_env or just the mod_envif Mainbox:/etc/apache2 # grep -R mod_env * returns nothing but Mainbox:/etc/apache2 # grep -R mod_setenv * server-tuning.conf:<IfModule mod_setenvif.c> sysconfig.d/loadmodule.conf:LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so Is that supposed to include the SetEnv directive or not? When I look in /usr/lib64/apache_prefork, and others, I do see a apache2/mod_env.so but there's nothing in my config that references anything like that. All the 'LoadModule' directives are in 'loadmodules.conf' and thy all reference items in /usr/lib64/apache2-prefork/ I would have thought that 'SetEnv' would have been a pretty fundamental option but it seems not to be used elsewhere. Odd that. Now is this a bug? Perhaps the testers had mod_env installed & configured for some other reason? -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Fri, 3 Jul 2015 09:44:46 -0400 Anton Aylward wrote:
When I look in /usr/lib64/apache_prefork, and others, I do see a
apache2/mod_env.so
but there's nothing in my config that references anything like that. All the 'LoadModule' directives are in 'loadmodules.conf' and thy all reference items in /usr/lib64/apache2-prefork/
Hi Anton, From: <https://doc.opensuse.org/documentation/html/openSUSE_121/opensuse-reference/cha.apache2.html#sec.apache2.modules> 16.4.2. [Module] Activation and Deactivation "If you prefer to activate or deactivate the modules manually, use the commands a2enmod mod_foo or a2dismod mod_foo, respectively. a2enmod -l outputs a list of all currently active modules." hth & regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/cabdbf4d350ab6a15265803acab1634d.jpg?s=120&d=mm&r=g)
On 07/03/2015 09:57 AM, Carl Hartung wrote:
On Fri, 3 Jul 2015 09:44:46 -0400 Anton Aylward wrote:
When I look in /usr/lib64/apache_prefork, and others, I do see a
apache2/mod_env.so
but there's nothing in my config that references anything like that. All the 'LoadModule' directives are in 'loadmodules.conf' and thy all reference items in /usr/lib64/apache2-prefork/
Hi Anton,
16.4.2. [Module] Activation and Deactivation
"If you prefer to activate or deactivate the modules manually, use the commands a2enmod mod_foo or a2dismod mod_foo, respectively. a2enmod -l outputs a list of all currently active modules."
hth & regards,
Yes, thank you, Carl. So it was a RTFM, but its also knowing the right M to R :-0 A a2enmod mod-env allowed ownCloud to start. However the issue of "is this a bug" remains. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a6ffef5dde34bf02c36fb9fb70f3e397.jpg?s=120&d=mm&r=g)
On Fri, 3 Jul 2015 15:44, Anton Aylward <opensuse@...> wrote:
[snip]
# /usr/sbin/start_apache2 AH00526: Syntax error on line 10 of /etc/apache2/conf.d/owncloud.conf: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration. [snip] I'm unclear from the docs if I should have a mod_env or just the mod_envif
Mainbox:/etc/apache2 # grep -R mod_env *
returns nothing but
Mainbox:/etc/apache2 # grep -R mod_setenv * server-tuning.conf:<IfModule mod_setenvif.c> sysconfig.d/loadmodule.conf:LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
Is that supposed to include the SetEnv directive or not?
When I look in /usr/lib64/apache_prefork, and others, I do see a
apache2/mod_env.so
but there's nothing in my config that references anything like that. All the 'LoadModule' directives are in 'loadmodules.conf' and thy all reference items in /usr/lib64/apache2-prefork/
I would have thought that 'SetEnv' would have been a pretty fundamental option but it seems not to be used elsewhere. Odd that.
Irritating, but have a look at this file: "/etc/sysconfig/apache2" In there are the modules defined that apache2 will load in openSUSE. Add / enable "mod_env" there. Also a pre/after update diff of that file could shed some light on your situation. - Yamaban. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/cabdbf4d350ab6a15265803acab1634d.jpg?s=120&d=mm&r=g)
On 07/03/2015 10:04 AM, Yamaban wrote:
Irritating, but have a look at this file:
"/etc/sysconfig/apache2"
In there are the modules defined that apache2 will load in openSUSE.
Add / enable "mod_env" there.
No it wasn't there and yes, the command Carl advised me of added it there.
Also a pre/after update diff of that file could shed some light on your situation.
There isn't a .rpmsave for that file. Looking at the zypper.log file I don't see any changes to that file. I go back to look at the snapshots (this is a BtrFS ROOTFS) the only change I see is the one I just made. The diff I earlier pointed out in the ownCloud.conf introduced the SetEnv directives. The original config for Apache didn't have a mod_env. The more I think about this the more I think that it is a bug that got by because the testers either didn't test or had a configuration that mod_env loaded for other reasons. I never had Apache before I started running ownCloud, so we can think of it as a 'virgin' or basic install. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Fri, 3 Jul 2015 10:20:28 -0400 Anton Aylward wrote:
The more I think about this the more I think that it is a bug that got by because the testers either didn't test or had a configuration that mod_env loaded for other reasons.
I agree. mod_env was installed, just not activated. The ownCloud package should check and activate it. regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
Hi Anton, Addendum: My earlier response was essentially correct, but the documentation I linked to was outdated. For the record, the current documentation is here: <https://activedoc.opensuse.org/book/opensuse-reference/chapter-20-the-apache-http-server> And I'm not at all including this to imply 'RTFM' :-) Whenever I touch httpd / apache2 on openSUSE, I always keep the documentation on standby. It's a habit, I guess... regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Anton Aylward
-
Carl Hartung
-
Yamaban