apache2 config

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

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

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/

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.

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.

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 :slight_smile: to bad this app need apache.

Thanks

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. :slight_smile:


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.

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 :slight_smile: 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/