[Fusionforge-commits] r14899 - in branches/Branch_5_1/src: etc etc/httpd.conf.d etc/httpd.conf.d-fhs etc/httpd.conf.d-opt etc/httpd.conf.d-usrlocal utils
Olivier Berger
olberger at fusionforge.org
Mon Nov 21 17:34:17 CET 2011
Author: olberger
Date: 2011-11-21 17:34:16 +0100 (Mon, 21 Nov 2011)
New Revision: 14899
Modified:
branches/Branch_5_1/src/etc/README.httpd-conf-d-flavours
branches/Branch_5_1/src/etc/httpd.conf-fhs
branches/Branch_5_1/src/etc/httpd.conf.d-fhs/01-namevhost.conf
branches/Branch_5_1/src/etc/httpd.conf.d-fhs/02-config-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d-fhs/10-vhosts-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d-fhs/README.generated
branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-main.inc
branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-projects.inc
branches/Branch_5_1/src/etc/httpd.conf.d-opt/01-namevhost.conf
branches/Branch_5_1/src/etc/httpd.conf.d-opt/02-config-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d-opt/10-vhosts-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d-opt/README.generated
branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-main.inc
branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-projects.inc
branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/01-namevhost.conf
branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/02-config-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/10-vhosts-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/README.generated
branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-main.inc
branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-projects.inc
branches/Branch_5_1/src/etc/httpd.conf.d/01-namevhost.conf
branches/Branch_5_1/src/etc/httpd.conf.d/02-config-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d/10-vhosts-main.conf
branches/Branch_5_1/src/etc/httpd.conf.d/vhost-main.inc
branches/Branch_5_1/src/etc/httpd.conf.d/vhost-projects.inc
branches/Branch_5_1/src/utils/manage-apache-config.sh
Log:
Add more docs and README files about generated apache conf files
Modified: branches/Branch_5_1/src/etc/README.httpd-conf-d-flavours
===================================================================
--- branches/Branch_5_1/src/etc/README.httpd-conf-d-flavours 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/README.httpd-conf-d-flavours 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,8 +1,16 @@
+The following information may be helpful to developers.
+
The different httpd.conf.d-*/ directories are *generated* out of
-contents of httpd.conf.d/.
+contents of 'httpd.conf.d/'. At the moment, there are 3 flavours of
+these files ("fhs", "opt" and "usrlocal").
-See src/utils/manage-apache-config.sh
+The script src/utils/manage-apache-config.sh must be used to
+regenerate the files for these flavours.
-Please make modifications in the source files inside httpd.conf.d/.
+Please make modifications in the source files inside 'httpd.conf.d/'
+and regenerate.
+More details available in :
+http://lists.fusionforge.org/pipermail/fusionforge-general/2010-June/001074.html
+
-- Olivier Berger
Modified: branches/Branch_5_1/src/etc/httpd.conf-fhs
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf-fhs 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf-fhs 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,2 +1,5 @@
# Include all FusionForge-related configuration files
+#
+# TODO: add a pointer to documentation about the Apache configuration of FusionForge
+#
Include /etc/gforge/httpd.conf.d/*.conf
Modified: branches/Branch_5_1/src/etc/httpd.conf.d/01-namevhost.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d/01-namevhost.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d/01-namevhost.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,2 +1,4 @@
+# Name-based Virtual Host Support : supports multiple websites over a single IP address
+
NameVirtualHost *:80
NameVirtualHost *:443
Modified: branches/Branch_5_1/src/etc/httpd.conf.d/02-config-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d/02-config-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d/02-config-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,10 +1,11 @@
#
-# Main directory options
+# Main directory options ({core/source_path}/www contains the PHP scripts of FusionForge)
#
<Directory {core/source_path}/www>
Options Indexes FollowSymlinks
AllowOverride All
+ # define access restrictions for the main site
Include {core/config_path}/httpd.conf.d/auth-main.inc
#
Modified: branches/Branch_5_1/src/etc/httpd.conf.d/10-vhosts-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d/10-vhosts-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d/10-vhosts-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,6 +1,9 @@
#
# Main host
#
+
+# Differences between HTTP and HTTPS are in ssl-on.inc/ssl-off.inc
+
<VirtualHost *:80>
Include {core/config_path}/httpd.conf.d/vhost-main.inc
Include {core/config_path}/httpd.conf.d/block-trace.inc
Modified: branches/Branch_5_1/src/etc/httpd.conf.d/vhost-main.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d/vhost-main.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d/vhost-main.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,3 +1,6 @@
+
+# We are inside <VirtualHost ...>
+
ServerName {core/web_host}
ServerAlias www.{core/web_host}
ServerAdmin webmaster@{core/web_host}
@@ -8,6 +11,7 @@
UserDir disabled
</IfModule>
+# Define configuration/env variables for passing passwords and other secrets to PHP
<Directory {core/source_path}/www>
Include {core/config_path}/httpd.conf.d/secrets.inc
</Directory>
Modified: branches/Branch_5_1/src/etc/httpd.conf.d/vhost-projects.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d/vhost-projects.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d/vhost-projects.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,4 @@
-# per-project vhost content
+# per-project vhost content : myproject1.myforge.com, myproject2.myforge.com, etc.
ServerName siteadmin.{core/web_host}
ServerAlias *.{core/web_host}
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-fhs/01-namevhost.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-fhs/01-namevhost.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-fhs/01-namevhost.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,2 +1,4 @@
+# Name-based Virtual Host Support : supports multiple websites over a single IP address
+
NameVirtualHost *:80
NameVirtualHost *:443
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-fhs/02-config-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-fhs/02-config-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-fhs/02-config-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,10 +1,11 @@
#
-# Main directory options
+# Main directory options (/usr/share/gforge/www contains the PHP scripts of FusionForge)
#
<Directory /usr/share/gforge/www>
Options Indexes FollowSymlinks
AllowOverride All
+ # define access restrictions for the main site
Include /etc/gforge/httpd.conf.d/auth-main.inc
#
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-fhs/10-vhosts-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-fhs/10-vhosts-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-fhs/10-vhosts-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,6 +1,9 @@
#
# Main host
#
+
+# Differences between HTTP and HTTPS are in ssl-on.inc/ssl-off.inc
+
<VirtualHost *:80>
Include /etc/gforge/httpd.conf.d/vhost-main.inc
Include /etc/gforge/httpd.conf.d/block-trace.inc
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-fhs/README.generated
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-fhs/README.generated 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-fhs/README.generated 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,6 @@
-Attention : contents of this directory are *generated files*.
+Attention developers : contents of this directory are *generated
+files* for FHS like paths.
See ../README.httpd-conf-d-flavours for more details
+-- OlivierBerger
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-main.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-main.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-main.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,3 +1,6 @@
+
+# We are inside <VirtualHost ...>
+
ServerName {core/web_host}
ServerAlias www.{core/web_host}
ServerAdmin webmaster@{core/web_host}
@@ -8,6 +11,7 @@
UserDir disabled
</IfModule>
+# Define configuration/env variables for passing passwords and other secrets to PHP
<Directory /usr/share/gforge/www>
Include /etc/gforge/httpd.conf.d/secrets.inc
</Directory>
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-projects.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-projects.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-fhs/vhost-projects.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,4 @@
-# per-project vhost content
+# per-project vhost content : myproject1.myforge.com, myproject2.myforge.com, etc.
ServerName siteadmin.{core/web_host}
ServerAlias *.{core/web_host}
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-opt/01-namevhost.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-opt/01-namevhost.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-opt/01-namevhost.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,2 +1,4 @@
+# Name-based Virtual Host Support : supports multiple websites over a single IP address
+
NameVirtualHost *:80
NameVirtualHost *:443
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-opt/02-config-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-opt/02-config-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-opt/02-config-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,10 +1,11 @@
#
-# Main directory options
+# Main directory options (/opt/gforge/www contains the PHP scripts of FusionForge)
#
<Directory /opt/gforge/www>
Options Indexes FollowSymlinks
AllowOverride All
+ # define access restrictions for the main site
Include /etc/gforge/httpd.conf.d/auth-main.inc
#
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-opt/10-vhosts-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-opt/10-vhosts-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-opt/10-vhosts-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,6 +1,9 @@
#
# Main host
#
+
+# Differences between HTTP and HTTPS are in ssl-on.inc/ssl-off.inc
+
<VirtualHost *:80>
Include /etc/gforge/httpd.conf.d/vhost-main.inc
Include /etc/gforge/httpd.conf.d/block-trace.inc
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-opt/README.generated
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-opt/README.generated 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-opt/README.generated 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,6 @@
-Attention : contents of this directory are *generated files*.
+Attention developers : contents of this directory are *generated
+files* for /opt like paths.
See ../README.httpd-conf-d-flavours for more details
+-- OlivierBerger
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-main.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-main.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-main.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,3 +1,6 @@
+
+# We are inside <VirtualHost ...>
+
ServerName {core/web_host}
ServerAlias www.{core/web_host}
ServerAdmin webmaster@{core/web_host}
@@ -8,6 +11,7 @@
UserDir disabled
</IfModule>
+# Define configuration/env variables for passing passwords and other secrets to PHP
<Directory /opt/gforge/www>
Include /etc/gforge/httpd.conf.d/secrets.inc
</Directory>
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-projects.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-projects.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-opt/vhost-projects.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,4 @@
-# per-project vhost content
+# per-project vhost content : myproject1.myforge.com, myproject2.myforge.com, etc.
ServerName siteadmin.{core/web_host}
ServerAlias *.{core/web_host}
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/01-namevhost.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/01-namevhost.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/01-namevhost.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,2 +1,4 @@
+# Name-based Virtual Host Support : supports multiple websites over a single IP address
+
NameVirtualHost *:80
NameVirtualHost *:443
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/02-config-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/02-config-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/02-config-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,10 +1,11 @@
#
-# Main directory options
+# Main directory options (/usr/local/share/gforge/www contains the PHP scripts of FusionForge)
#
<Directory /usr/local/share/gforge/www>
Options Indexes FollowSymlinks
AllowOverride All
+ # define access restrictions for the main site
Include /etc/gforge/httpd.conf.d/auth-main.inc
#
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/10-vhosts-main.conf
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/10-vhosts-main.conf 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/10-vhosts-main.conf 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,6 +1,9 @@
#
# Main host
#
+
+# Differences between HTTP and HTTPS are in ssl-on.inc/ssl-off.inc
+
<VirtualHost *:80>
Include /etc/gforge/httpd.conf.d/vhost-main.inc
Include /etc/gforge/httpd.conf.d/block-trace.inc
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/README.generated
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/README.generated 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/README.generated 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,6 @@
-Attention : contents of this directory are *generated files*.
+Attention developers : contents of this directory are *generated
+files* for /usr/local like paths.
See ../README.httpd-conf-d-flavours for more details
+-- OlivierBerger
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-main.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-main.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-main.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,3 +1,6 @@
+
+# We are inside <VirtualHost ...>
+
ServerName {core/web_host}
ServerAlias www.{core/web_host}
ServerAdmin webmaster@{core/web_host}
@@ -8,6 +11,7 @@
UserDir disabled
</IfModule>
+# Define configuration/env variables for passing passwords and other secrets to PHP
<Directory /usr/local/share/gforge/www>
Include /etc/gforge/httpd.conf.d/secrets.inc
</Directory>
Modified: branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-projects.inc
===================================================================
--- branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-projects.inc 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/etc/httpd.conf.d-usrlocal/vhost-projects.inc 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,4 +1,4 @@
-# per-project vhost content
+# per-project vhost content : myproject1.myforge.com, myproject2.myforge.com, etc.
ServerName siteadmin.{core/web_host}
ServerAlias *.{core/web_host}
Modified: branches/Branch_5_1/src/utils/manage-apache-config.sh
===================================================================
--- branches/Branch_5_1/src/utils/manage-apache-config.sh 2011-11-20 15:42:30 UTC (rev 14898)
+++ branches/Branch_5_1/src/utils/manage-apache-config.sh 2011-11-21 16:34:16 UTC (rev 14899)
@@ -1,6 +1,7 @@
#! /bin/bash -e
-# Generates contents of the apache configuration files based on the sources in src/etc/httpd.conf.d/ :
+# Generates contents of the apache configuration files based on the
+# sources in src/etc/httpd.conf.d/ for 3 different flavours :
# - src/etc/httpd.conf.d-fhs/ : for FHS like paths (/usr, ...)
# - src/etc/httpd.conf.d-opt/ : for /opt like paths
# - src/etc/httpd.conf.d-usrlocal/ : for /usr/local like paths
@@ -8,6 +9,9 @@
# See the thread at : http://lists.fusionforge.org/pipermail/fusionforge-general/2010-June/001067.html for some more details
#
+# invoke with utils/manage-apache-config.sh build to regenerate the config files
+# or with utils/manage-apache-config.sh install to ...(TODO: document this)...
+
case $1 in
build)
if [ -e src/etc/httpd.conf.d ] ; then # We're in the parent dir
@@ -36,7 +40,16 @@
-e 's,{scmsvn/repos_path},/var/lib/gforge/chroot/scmrepos/svn,g' \
$i > httpd.conf.d-fhs/$(basename $i)
done
+ message="FHS like paths"
+ cat > httpd.conf.d-fhs/README.generated <<EOF
+Attention developers : contents of this directory are *generated
+files* for $message.
+See ../README.httpd-conf-d-flavours for more details
+
+-- OlivierBerger
+EOF
+
# /opt like paths
mkdir -p httpd.conf.d-opt
for i in httpd.conf.d/*.inc httpd.conf.d/*.conf ; do
@@ -52,6 +65,15 @@
-e 's,{scmsvn/repos_path},/var/lib/gforge/svnroot,g' \
$i > httpd.conf.d-opt/$(basename $i)
done
+ message="/opt like paths"
+ cat > httpd.conf.d-opt/README.generated <<EOF
+Attention developers : contents of this directory are *generated
+files* for $message.
+
+See ../README.httpd-conf-d-flavours for more details
+
+-- OlivierBerger
+EOF
# /usr/local like paths
mkdir -p httpd.conf.d-usrlocal
@@ -68,6 +90,15 @@
-e 's,{scmsvn/repos_path},/var/lib/gforge/chroot/scmrepos/svn,g' \
$i > httpd.conf.d-usrlocal/$(basename $i)
done
+ message="/usr/local like paths"
+ cat > httpd.conf.d-usrlocal/README.generated <<EOF
+Attention developers : contents of this directory are *generated
+files* for $message.
+
+See ../README.httpd-conf-d-flavours for more details
+
+-- OlivierBerger
+EOF
;;
install)
@@ -104,6 +135,7 @@
*)
echo "Unknown operation"
+ echo "invoke with $0 [build|install]"
exit 1
;;
esac
More information about the Fusionforge-commits
mailing list