# apache2 config

**URL:** <https://forums.suse.com/t/apache2-config/30057>\
**Category:** SLES Configure-Administer\
**Created:** [July 17, 2017, 5:17pm UTC](https://forums.suse.com/t/apache2-config/30057 "2017-07-17T17:17:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [July 17, 2017, 5:17pm UTC](https://forums.suse.com/t/apache2-config/30057/1 "2017-07-17T17:17:34Z")

</div>

Having a little trouble identifying what files I should/can change vs the ones I should leave alone.

Is there a SUSE Apache2 specific admin guide somewhere ? I can seem to find one.

Specifically looking at the loadmodules.conf files. There is one in /etc/apache2/ and another in /etc/apache2/sysconfig.d (this one states to make changes in sysconfig (/etc/sysconfig/apache2)

So if i need to add 5 additional modules where would I put them so the system see them correctly with duplicate warnings?

thanks

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 17, 2017, 5:45pm UTC](https://forums.suse.com/t/apache2-config/30057/2 "2017-07-17T17:45:13Z")

</div>

Hi  
Only see one for SLES 11 (but still applicable) the file to modify is /etc/sysconfig/apache2;  
[https://www.suse.com/documentation/sles11/book\_sle\_admin/data/sec\_apache2\_configuration.html](https://www.suse.com/documentation/sles11/book_sle_admin/data/sec_apache2_configuration.html)

```auto
a2enmod -l

actions alias auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout authn_core

cat sysconfig.d/loadmodule.conf

# File generated from /etc/sysconfig/apache2, do not edit. Edit the sysconfig file instead.
LoadModule actions_module /usr/lib64/apache2-prefork/mod_actions.so
LoadModule alias_module /usr/lib64/apache2-prefork/mod_alias.so
LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
LoadModule authn_file_module /usr/lib64/apache2-prefork/mod_authn_file.so
LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
LoadModule authz_groupfile_module /usr/lib64/apache2-prefork/mod_authz_groupfile.so
LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
LoadModule authz_user_module /usr/lib64/apache2-prefork/mod_authz_user.so
LoadModule autoindex_module /usr/lib64/apache2-prefork/mod_autoindex.so
LoadModule cgi_module /usr/lib64/apache2-prefork/mod_cgi.so
LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
LoadModule env_module /usr/lib64/apache2-prefork/mod_env.so
LoadModule expires_module /usr/lib64/apache2-prefork/mod_expires.so
LoadModule include_module /usr/lib64/apache2-prefork/mod_include.so
LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
LoadModule mime_module /usr/lib64/apache2-prefork/mod_mime.so
LoadModule negotiation_module /usr/lib64/apache2-prefork/mod_negotiation.so
LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
LoadModule userdir_module /usr/lib64/apache2-prefork/mod_userdir.so
LoadModule reqtimeout_module /usr/lib64/apache2-prefork/mod_reqtimeout.so
LoadModule authn_core_module /usr/lib64/apache2-prefork/mod_authn_core.so

From /etc/sysconfig/apache2

# apache's default installation
# APACHE_MODULES="authz_host actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir"
# your settings
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout authn_core"
```

So add them via YaST /etc/sysconfig editor and should be fine as long as the modules exist in /usr/lib64/apache2-prefork/

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [July 17, 2017, 5:53pm UTC](https://forums.suse.com/t/apache2-config/30057/3 "2017-07-17T17:53:07Z")

</div>

On 07/17/2017 08:24 AM, cisaksen wrote:[color=blue]

> Having a little trouble identifying what files I should/can change vs  
> the ones I should leave alone.
> 
> Is there a SUSE Apache2 specific admin guide somewhere ? I can seem to  
> find one.[/color]

Not of which I am aware; I usually either setup modules initially via  
Yast, or else I modify the /etc/sysconfig/apache2 file since that’s the  
one that maters.  
[color=blue]

> Specifically looking at the loadmodules.conf files. There is one in  
> /etc/apache2/ and another in /etc/apache2/sysconfig.d (this one states  
> to make changes in sysconfig (/etc/sysconfig/apache2)[/color]

The former is created on the fly, I believe, thus the message. One reason  
is that parsing Apache httpd logs in a way for management tools to handle  
is hard, so instead most places have a config file for management tools  
and then the Apache httpd config files are generated on the fly.  
[color=blue]

> So if i need to add 5 additional modules where would I put them so the  
> system see them correctly with duplicate warnings?[/color]

/etc/sysconfig/apache2 is good; the others are generated from it, so when  
you restart Apache 2httpd you’ll lose your changes.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the  
forum as I do not use the web interface often.

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [July 17, 2017, 6:03pm UTC](https://forums.suse.com/t/apache2-config/30057/4 "2017-07-17T18:03:42Z")

</div>

On 17/07/17 15:24, cisaksen wrote:  
[color=blue]

> Having a little trouble identifying what files I should/can change vs  
> the ones I should leave alone.
> 
> Is there a SUSE Apache2 specific admin guide somewhere ? I can seem to  
> find one.
> 
> Specifically looking at the loadmodules.conf files. There is one in  
> /etc/apache2/ and another in /etc/apache2/sysconfig.d (this one states  
> to make changes in sysconfig (/etc/sysconfig/apache2)
> 
> So if i need to add 5 additional modules where would I put them so the  
> system see them correctly with duplicate warnings?[/color]

Add the module names (without the mod\_ prefixes) to the APACHE\_MODULES  
line in /etc/sysconfig/apache2 and then restart Apache.

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [July 18, 2017, 12:15am UTC](https://forums.suse.com/t/apache2-config/30057/5 "2017-07-18T00:15:20Z")

</div>

Thanks for the info,

I don’t like the idea that a apache configuration file in is a different location from the others (/etc/apache2). You have make configurations changes in here as it is for virtual hosts etc… So why not keep everything together like you normally would ? I don’t know just seem more complicated then it needs to be.

Must be why I like nginx so much 🙂 to bad this app need apache.

Thanks

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [July 18, 2017, 1:33am UTC](https://forums.suse.com/t/apache2-config/30057/6 "2017-07-18T01:33:59Z")

</div>

On 07/17/2017 03:24 PM, cisaksen wrote:[color=blue]

> I don’t like the idea that a apache configuration file in is a different  
> location from the others (/etc/apache2). You have make configurations  
> changes in here as it is for virtual hosts etc… So why not keep  
> everything together like you normally would ? I don’t know just seem  
> more complicated then it needs to be.[/color]

In case it was not clear before, the reason for this is so you can have  
simple ways to manage many things, for example Yast is used t manage most  
parts of the entire system, from general user administration to firewalls,  
from hardware management to software configuration. Making those tools  
work sometimes requires a bit of extra work; setting up Apache httpd is  
trivial on SLES because it’s built into Yast, along with everything else,  
but nginx may not be (I’ve never seen a Yast module for it). If you would  
like to improve the Yast module to work on the native Apache httpd files,  
I’m sure somebody would love to use that. 🙂

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the  
forum as I do not use the web interface often.

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [July 18, 2017, 1:41am UTC](https://forums.suse.com/t/apache2-config/30057/7 "2017-07-18T01:41:39Z")

</div>

cisaksen Wrote in message:  
[color=blue]

> Thanks for the info,
> 
> I don’t like the idea that a apache configuration file in is a different  
> location from the others (/etc/apache2). You have make configurations  
> changes in here as it is for virtual hosts etc.. So why not keep  
> everything together like you normally would ? I don’t know just seem  
> more complicated then it needs to be.
> 
> Must be why I like nginx so much 🙂 to bad this app need apache.[/color]

You are free to edit the configuration files in /etc/apache2/ but  
the way SUSE do things could mean those changes are overridden -  
with SUSE Linux various services are configured via a  
service-specific file in /etc/sysconfig/ that is then used to  
configure the service dynamically on startup. For virtual hosts  
you could then drop a file into /etc/apache2/vhosts.d/ containing  
a suitable Apache configuration snippet and this will be used at  
Apache startup.

## HTH.

Simon Flood  
SUSE Knowledge Partner

----Android NewsGroup Reader----  
[http://usenet.sinaapp.com/](http://usenet.sinaapp.com/)
