Koozali.org: home of the SME Server

httpd.conf differences - CentOS and SAIL/SME8

Offline apmuthu

  • *
  • 244
  • +0/-0
httpd.conf differences - CentOS and SAIL/SME8
« on: February 25, 2013, 02:33:49 PM »
The differences between the httpd.conf that is available in a vanilla CentOS 5.9 install at /etc/httpd/conf/httpd.conf and the one in the SAIL v3.1.1-22 RPM at /opt/sark/cache/httpd.conf (hasn't changed since SAIL v3.1.0-145) that overwrites the CentOS one is:
Code: [Select]
--- CentOS5/etc/httpd/conf/httpd.conf    Thu Jan 10 18:57:00 2013
+++ SAIL311-22rpm/opt/sark/cache/httpd.conf    Sun Oct 24 23:43:06 2010
@@ -228,8 +228,8 @@
 #  when the value of (unsigned)Group is above 60000;
 #  don't use Group #-1 on these systems!
 #
-User apache
-Group apache
+User  www
+Group www
 
 ### Section 2: 'Main' server configuration
 #
@@ -278,7 +278,7 @@
 # documents. By default, all requests are taken from this directory, but
 # symbolic links and aliases may be used to point to other locations.
 #
-DocumentRoot "/var/www/html"
+DocumentRoot "/opt/sark/www"
 
 #
 # Each directory to which Apache has access can be configured with respect
@@ -303,7 +303,7 @@
 #
 # This should be changed to whatever you set DocumentRoot to.
 #
-<Directory "/var/www/html">
+<Directory "/opt/sark/www">
 
 #
 # Possible values for the Options directive are "None", "All",
@@ -331,6 +331,10 @@
 #
     Order allow,deny
     Allow from all
+    AuthType Basic
+    AuthName "Restricted Files"
+    AuthUserFile /opt/sark/passwd/passwords
+    Require user admin
 
 </Directory>
 
@@ -561,7 +565,7 @@
 # The same rules about trailing "/" apply to ScriptAlias directives as to
 # Alias.
 #
-ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
+ScriptAlias /cgi-bin/ "/opt/sark/www/cgi-bin/"
 
 #
 # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
@@ -572,6 +576,11 @@
     Options None
     Order allow,deny
     Allow from all
+    AuthType Basic
+    AuthName "Restricted Files"
+    AuthUserFile /opt/sark/passwd/passwords
+    Require user admin
+
 </Directory>
 
 #
@@ -989,3 +998,64 @@
 #    ErrorLog logs/dummy-host.example.com-error_log
 #    CustomLog logs/dummy-host.example.com-access_log common
 #</VirtualHost>
+
+Alias /sark-common/ "/opt/sark/www/sark-common/"
+#Alias /sark "/opt/sark/www"
+Alias /server-sounds/ "/var/lib/asterisk/sounds/"
+
+#<Directory "/opt/sark/www/html">
+#
+# #   Options Indexes FollowSymLinks
+#    AllowOverride None
+#    Order allow,deny
+#    Allow from all
+#    AuthType Basic
+#    AuthName "Restricted Files"
+#    AuthUserFile /opt/sark/passwd/passwords
+#    Require user admin
+#
+#</Directory>
+#ScriptAlias /cgi-bin/ "/opt/sark/www/html/cgi-bin/"
+#
+#<Directory "/opt/sark/www/html/cgi-bin">
+#
+#    AllowOverride None
+#    Options None
+#    Order allow,deny
+#    Allow from all
+#    AuthType Basic
+#    AuthName "Restricted Files"
+#    AuthUserFile /opt/sark/passwd/passwords
+#    Require user admin
+#
+#</Directory>
+
+<Directory "/opt/sark/www/sark-common">
+    Options Indexes MultiViews
+    AllowOverride None
+    Order allow,deny
+    Allow from all
+</Directory>
+
+<Directory "/var/lib/asterisk/sounds">
+    Options Indexes MultiViews
+    AllowOverride None
+    Order allow,deny
+    Allow from all
+</Directory>
+#
+#
+#
+#    RewriteLog /var/log/rewrite_log
+#    RewriteLogLevel 5
+    RewriteEngine on
+    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
+    RewriteRule .* - [F]
+
+    RewriteCond %{REQUEST_URI} ^/DPRX(.*)/
+    RewriteRule /DPRX(.*) http://$1 [L,P]
+
+    RewriteCond %{HTTP_REFERER} DPRX
+    RewriteCond %{REQUEST_URI} ^/(.*)
+    RewriteRule .* %{HTTP_REFERER}/%1 [C]
+    RewriteRule ^(http://.*)//(.*)$ $1/$2  [L]

This difference shows up when installing the SAIL rpms one by one - the user:group www:www when not available sometimes, the user root (should have been apache) gets assumed - possibly gets corrected during some rpm installation later.

For a plain CentOS install can the user be assumed to be apache or should it be retained as www and does it get overwritten if the file already exists as would be the case here?

Also the user admin will also not be present to start with - does the sail rpm create it if it does not exist?
« Last Edit: February 25, 2013, 02:37:54 PM by apmuthu »