Description of problem: Please check EWS 2.1 httpd.conf and other EWS 2.1 httpd config files and keep the same default configuration for JWS30 httpd as much as possible. Mainly for modules configurations (mod_mime, mod_dav, language, mod_negotiation, ...) Expected results: JWS30 httpd configuration should be near the same like EWS 2.1 httpd
Hi Libor, Sorry I'm not sure about your requirements, could you please provide more details on it? Currently the configs are provided by httpd2.4 by default. I'll check httpd in EWS 2.1 in the meanwhile but if you could provide more details that will be helpful :-) btw, do you want the changes to be applied in rpm + zip or zip only? If it needs to be applied into rpm I'll modify the httpd24 building process.
I mean EWS 2.1 specific default configurations in httpd.conf for languages, different modules (mod_mime, mod_dav,..), etc.. Second question should answer Michal. Michal, did we have the same httpd.conf configurations for EWS 2.1 RHEL zips and RPMs ?
Yes, the httpd configuration in zip and rpm *must be the same*.
# Investigation Part I # mod_dav config of jws3: power:jws-3.0 weinanli$ cat httpd/conf.d/00-dav.conf LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule dav_lock_module modules/mod_dav_lock.so mod_dav config of ews2.1: power:jboss-ews-2.1 weinanli$ grep -r 'dav' httpd/conf httpd/conf.d httpd/conf/httpd.conf:LoadModule dav_module modules/mod_dav.so httpd/conf/httpd.conf:LoadModule dav_fs_module modules/mod_dav_fs.so httpd/conf/httpd.conf:<IfModule mod_dav_fs.c> httpd/conf/httpd.conf: DAVLockDB /var/lib/dav/lockdb So in jws3 it lacks: # # WebDAV module configuration section. # <IfModule mod_dav_fs.c> # Location of the WebDAV lock database. DAVLockDB /var/lib/dav/lockdb </IfModule>
# Investigation Part II # mod_mime config of jws3: power:jws-3.0 weinanli$ grep -rl 'mime' httpd/conf httpd/conf.d httpd/conf/httpd.conf httpd/conf/magic httpd/conf.d/00-base.conf httpd.conf: <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig /etc/mime.types ... AddType application/x-compress .Z AddType application/x-gzip .gz .tgz ... # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # AddType text/html .shtml AddOutputFilter INCLUDES .shtml </IfModule> # # Specify a default charset for all content served; this enables # interpretation of all content as UTF-8 by default. To use the # default browser choice (ISO-8859-1), or to allow the META tags # in HTML content to override this choice, comment out this # directive: # AddDefaultCharset UTF-8 <IfModule mime_magic_module> # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # MIMEMagicFile conf/magic </IfModule> ... conf.d/00-base.conf: LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule mime_module modules/mod_mime.so ... 'httpd/conf/magic' should be expected version upgrade and not related with mod_mime: power:jboss-ews-2.1 weinanli$ diff -Nur httpd/conf/magic ../jws-3.0/httpd/conf/magic --- httpd/conf/magic 2014-07-18 22:27:36.000000000 +0800 +++ ../jws-3.0/httpd/conf/magic 2014-12-19 17:09:25.000000000 +0800 @@ -262,6 +262,9 @@ #0 string CP color pointer #0 string BA bitmap array +0 string \x89PNG image/png +0 string FWS application/x-shockwave-flash +0 string CWS application/x-shockwave-flash #------------------------------------------------------------------------------ # lisp: file(1) magic for lisp programs @@ -380,7 +383,3 @@ 4 string moov video/quicktime 4 string mdat video/quicktime -# PNG [Portable Network Graphics, or "PNG's Not GIF"] images -# -# 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ... -0 string \211PNG\015 image/png --- mod_mime config of ews2.1: power:jboss-ews-2.1 weinanli$ grep -rl 'mime' httpd/conf httpd/conf.d httpd/conf/httpd.conf httpd/conf/magic httpd.conf: LoadModule mime_magic_module modules/mod_mime_magic.so ... LoadModule mime_module modules/mod_mime.so ... # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig /etc/mime.types ... DefaultType text/plain ... # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # <IfModule mod_mime_magic.c> # MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic </IfModule> ... # # Specify a default charset for all content served; this enables # interpretation of all content as UTF-8 by default. To use the # default browser choice (ISO-8859-1), or to allow the META tags # in HTML content to override this choice, comment out this # directive: # AddDefaultCharset UTF-8 ... # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz ... --- The only difference I could see on mod_mime is this line: 'DefaultType text/plain' which is in ews2.1 and not in jws3. And the DefaultType directive is removed in 2.4. If we need to keep same with ews2.1, we can add: 'ForceType text/plain' I doubt this is necessary... (@Libor, if possible please let me know what other modules you need me to check, and I'll go on checking them tomorrow daytime.)
btw, please note this is related with https://bugzilla.redhat.com/show_bug.cgi?id=1171807 Let me build a newest jws-compose tomorrow so you could check with it.
@Weinan, please compare httpd.conf between EWS 2.1 and JWS3.0. There are not only missing default configurations for modules but also many missing settings. Missing default modules and directives configurations: - webdav lockdb setting is missing BZ 1171807 - BrowserMatch - Alias /error/ "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/error/" and mod_negotiation.c, mod_include.c config for <Directory "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/error"> - AddHandler type-map var - Languages settings: ForceLanguagePriority, LanguagePriority, AddLanguage - IndexIgnore - HeaderName, ReadmeName - Icons settings: DefaultIcon, AddIcon, AddIconByType, AddIconByEncoding - <Directory "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/cgi-bin"> - ScriptAlias /cgi-bin/ "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/cgi-bin/" - <Directory "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/icons"> - Alias /icons/ "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/icons/" - ServerSignature On - HostnameLookups - <IfModule mod_mime_magic.c> - DefaultType text/plain - <Files ~ "^\.ht"> - AccessFileName .htaccess - DirectoryIndex index.html index.html.var - UseCanonicalName - <IfModule worker.c> and <IfModule prefork.c> configs - KeepAliveTimeout - MaxKeepAliveRequests - KeepAlive - Timeout - ServerTokens OS Some of these missing directives are deprecated. It needs more investigation.
AddDefaultCharset UTF-8 also missing
(In reply to Michal Haško from comment #3) > Yes, the httpd configuration in zip and rpm *must be the same*. Because of bz1171807, it's not possible to make RPM and ZIP configuration file verbosely same. As we have decided to merge the conf.d and conf.modules.d in ZIP bundle, this is not possible to get done in RPM installations, because some configuration files are merged into one during ZIP building process and .postinstall. The objective we can achieve is to make RPM and ZIP to function like same but with different configuration file structures.
(In reply to Libor Fuka from comment #7) > @Weinan, please compare httpd.conf between EWS 2.1 and JWS3.0. > There are not only missing default configurations for modules but also many > missing settings. > Missing default modules and directives configurations: > - webdav lockdb setting is missing BZ 1171807 > - BrowserMatch > - Alias /error/ "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/error/" and > mod_negotiation.c, mod_include.c config for <Directory > "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/error"> > - AddHandler type-map var > - Languages settings: ForceLanguagePriority, LanguagePriority, AddLanguage > - IndexIgnore > - HeaderName, ReadmeName > - Icons settings: DefaultIcon, AddIcon, AddIconByType, AddIconByEncoding > - <Directory "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/cgi-bin"> > - ScriptAlias /cgi-bin/ "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/cgi-bin/" > - <Directory "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/icons"> > - Alias /icons/ "/opt/EWS/2.1.0/jboss-ews-2.1/httpd/www/icons/" > - ServerSignature On > - HostnameLookups > - <IfModule mod_mime_magic.c> > - DefaultType text/plain > - <Files ~ "^\.ht"> > - AccessFileName .htaccess > - DirectoryIndex index.html index.html.var > - UseCanonicalName > - <IfModule worker.c> and <IfModule prefork.c> configs > - KeepAliveTimeout > - MaxKeepAliveRequests > - KeepAlive > - Timeout > - ServerTokens OS > > Some of these missing directives are deprecated. It needs more investigation. Thanks Libor! I'll investigate on them :-) btw, I'd suggest that we split this bug into separate bugs to track each of the problem.
comm #9: ok Weinan, we need to keep function between ZIP and RPM httpd default configuration the same. Configuration file structure should be different. Thanks a lot Weinan.
(In reply to Libor Fuka from comment #11) > comm #9: ok Weinan, we need to keep function between ZIP and RPM httpd > default configuration the same. Configuration file structure should be > different. > > Thanks a lot Weinan. Thanks for confirmation :-)
There are also some modules which are not loaded by default in JWS 3.0 and were in EWS 2.1. BZ 1179207
usertrack_module should be loaded by default.
Created attachment 987123 [details] EWS 2.1 default httpd configuration
Created attachment 988172 [details] bz1178630.patch
Just made a simple verification: [weli@dhcp-66-78-87 sbin]$ sudo ./apachectl start [weli@dhcp-66-78-87 sbin]$ ps -ef | grep httpd root 15157 1 0 00:43 ? 00:00:00 /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log -k start apache 15159 15157 0 00:43 ? 00:00:00 /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log -k start apache 15160 15157 0 00:43 ? 00:00:00 /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log -k start apache 15162 15157 0 00:43 ? 00:00:00 /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log -k start apache 15164 15157 0 00:43 ? 00:00:00 /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log -k start apache 15166 15157 0 00:43 ? 00:00:00 /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log -k start weli 15170 3785 0 00:43 pts/5 00:00:00 grep httpd [weli@dhcp-66-78-87 logs]$ cat error_log [Thu Feb 05 00:43:09.764865 2015] [core:notice] [pid 15156] SELinux policy enabled; httpd running as context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [Thu Feb 05 00:43:09.859489 2015] [auth_digest:notice] [pid 15157] AH01757: generating secret for digest authentication ... [Thu Feb 05 00:43:09.866519 2015] [lbmethod_heartbeat:notice] [pid 15157] AH02282: No slotmem from mod_heartmonitor [Thu Feb 05 00:43:09.870521 2015] [:notice] [pid 15157] Advertise initialized for process 15157 [Thu Feb 05 00:43:09.874793 2015] [mpm_prefork:notice] [pid 15157] AH00163: Apache/2.4.6 (Red Hat) mod_auth_kerb/5.4 mod_cluster/1.3.1.Beta1 OpenSSL/1.0.1e-fips configured -- resuming normal operations [Thu Feb 05 00:43:09.874827 2015] [core:notice] [pid 15157] AH00094: Command line: '/home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log' [Thu Feb 05 00:43:41.176964 2015] [autoindex:error] [pid 15159] [client ::1:49432] AH01276: Cannot serve directory /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/www/html/: No matching DirectoryIndex (index.html,index.html.var,index.html) found, and server-generated directory index forbidden by Options directive
I reviewed a patch and have a question: We do in patch prefork, worker (<IfModule prefork.c>...) settings in conf/00-base.conf which is loaded at the top of httpd.conf but we load MPM module in 00-mpm.conf which is loaded a the end of conf/httpd.conf. Is this correct ?
Actually I would prefer to close this one as WON'T FIX and have the configuration closed to the RHEL7 one, that already what we are doing for windows and solaris.
(In reply to Libor Fuka from comment #18) > I reviewed a patch and have a question: > We do in patch prefork, worker (<IfModule prefork.c>...) settings in > conf/00-base.conf which is loaded at the top of httpd.conf but we load MPM > module in 00-mpm.conf which is loaded a the end of conf/httpd.conf. > > Is this correct ? Thanks for checking Libor! I've moved the config from 00-base.conf to 00-mpm.conf: [weli@dhcp-66-78-87 httpd24-jws3-el7]$ git diff diff --git a/00-base.conf b/00-base.conf index 10e1610..01d32e0 100644 --- a/00-base.conf +++ b/00-base.conf @@ -397,42 +397,6 @@ MaxKeepAliveRequests 100 # KeepAliveTimeout 15 -## -## Server-Pool Size Regulation (MPM specific) -## - -# prefork MPM -# StartServers: number of server processes to start -# MinSpareServers: minimum number of server processes which are kept spare -# MaxSpareServers: maximum number of server processes which are kept spare -# ServerLimit: maximum value for MaxClients for the lifetime of the server -# MaxClients: maximum number of server processes allowed to start -# MaxRequestsPerChild: maximum number of requests a server process serves -<IfModule prefork.c> -StartServers 8 -MinSpareServers 5 -MaxSpareServers 20 -ServerLimit 256 -MaxClients 256 -MaxRequestsPerChild 4000 -</IfModule> - -# worker MPM -# StartServers: initial number of server processes to start -# MaxClients: maximum number of simultaneous client connections -# MinSpareThreads: minimum number of worker threads which are kept spare -# MaxSpareThreads: maximum number of worker threads which are kept spare -# ThreadsPerChild: constant number of worker threads in each server process -# MaxRequestsPerChild: maximum number of requests a server process serves -<IfModule worker.c> -StartServers 2 -MaxClients 150 -MinSpareThreads 25 -MaxSpareThreads 75 -ThreadsPerChild 25 -MaxRequestsPerChild 0 -</IfModule> - # # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname diff --git a/00-mpm.conf b/00-mpm.conf index 7bfd1d4..d8d2028 100644 --- a/00-mpm.conf +++ b/00-mpm.conf @@ -17,3 +17,38 @@ LoadModule mpm_prefork_module modules/mod_mpm_prefork.so # #LoadModule mpm_event_module modules/mod_mpm_event.so +## +## Server-Pool Size Regulation (MPM specific) +## + +# prefork MPM +# StartServers: number of server processes to start +# MinSpareServers: minimum number of server processes which are kept spare +# MaxSpareServers: maximum number of server processes which are kept spare +# ServerLimit: maximum value for MaxClients for the lifetime of the server +# MaxClients: maximum number of server processes allowed to start +# MaxRequestsPerChild: maximum number of requests a server process serves +<IfModule prefork.c> +StartServers 8 +MinSpareServers 5 +MaxSpareServers 20 +ServerLimit 256 +MaxClients 256 +MaxRequestsPerChild 4000 +</IfModule> + +# worker MPM +# StartServers: initial number of server processes to start +# MaxClients: maximum number of simultaneous client connections +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestsPerChild: maximum number of requests a server process serves +<IfModule worker.c> +StartServers 2 +MaxClients 150 +MinSpareThreads 25 +MaxSpareThreads 75 +ThreadsPerChild 25 +MaxRequestsPerChild 0 +</IfModule>
(In reply to Jean-frederic Clere from comment #19) > Actually I would prefer to close this one as WON'T FIX and have the > configuration closed to the RHEL7 one, that already what we are doing for > windows and solaris. Hi Jean-Frederic, This bug covers so many details about httpd, the whole progress and result will be out of control to revert it with all its dependencies. It covers: 1171807 1172005 1172047 1172303 1172304 1172306 1172316 1175307 1175317 1176513 1176521 1178816 1179207 1180562 1180563 1180572 1181545 1182212 1182225 1185767 1188298 If you just mean the changes according to comment 7, then these two commits are related: commit 513881dd978e07f1b1ed3defd657b457230d9d56 Author: Weinan Li <weli> Date: Fri Feb 6 14:49:53 2015 +0800 bz1178630-part2 commit 940147dd20d2eab1f82d811eca6feec09ff5a5d1 Author: Weinan Li <weli> Date: Thu Feb 5 00:49:16 2015 +0800 bz1178630
Verified with ER1