Commit 96bc3d62 authored by Leigh B Stoller's avatar Leigh B Stoller

More work on getting ready to switch over to apache 2.2 ... Move the

different versions into v1/v2 subdirs, since I did not like the
naming.

Add new version of the ops httpd.conf file, again taken from Dave's
linux-port branch, and then whacked on.

Add utah versions of the boss/ops config files and a utah target.
These will probably get removed later when we switch over, but I do
not want to lose the work I did to merge in the local hacks.
parent 6330000d
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2002-2011 University of Utah and the Flux Group. # Copyright (c) 2002-2012 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
# #
...@@ -22,16 +22,17 @@ endif ...@@ -22,16 +22,17 @@ endif
include $(OBJDIR)/Makeconf include $(OBJDIR)/Makeconf
CONFIG_FILES = httpd.conf-ops php.ini CONFIG_FILES = httpd.conf httpd.conf-ops php.ini
# #
# Move to Apache 22 ... # Move to Apache 22 ...
# #
ifeq ($(APACHE_VERSION),22) ifeq ($(APACHE_VERSION),22)
CONFIG_FILES += httpd.conf-v2 # For VPATH.
MOSTLY_SRCDIRS = ${SRCDIR}/v2
SCRIPT_HACK = 0 SCRIPT_HACK = 0
else else
CONFIG_FILES += httpd.conf-v1 MOSTLY_SRCDIRS = ${SRCDIR}/v1
endif endif
INSTALL_PHP_CONFIG = /usr/local/etc INSTALL_PHP_CONFIG = /usr/local/etc
...@@ -43,6 +44,15 @@ all: $(CONFIG_FILES) ...@@ -43,6 +44,15 @@ all: $(CONFIG_FILES)
include $(TESTBED_SRCDIR)/GNUmakerules include $(TESTBED_SRCDIR)/GNUmakerules
#
# Override version from GNUmakerules since the source is kept in a
# different place, and the config script is a pain to work with.
# Maybe we can just make this the default in GNUmakerules.
#
%: %.in $(OBJDIR)/config.status
@echo "Regenerating $@ from $(subst $(TESTBED_SRCDIR)/,,$<)"
cd $(OBJDIR) && CONFIG_FILES=$(SUBDIR)/$@:$(subst $(TESTBED_SRCDIR)/,,$<) ./config.status
# Like the INSTALL_ETCDIR target # Like the INSTALL_ETCDIR target
$(INSTALL_APACHE_CONFIG)/%: % $(INSTALL_APACHE_CONFIG)/%: %
@echo "Installing $<" @echo "Installing $<"
...@@ -57,10 +67,10 @@ $(INSTALL_APACHE_CONFIG)/%: % ...@@ -57,10 +67,10 @@ $(INSTALL_APACHE_CONFIG)/%: %
# #
# XXX ugh, do the same thing to detect php5... # XXX ugh, do the same thing to detect php5...
# #
# Note that ths is not needed for apache22. # Note that this is not needed for apache22.
# #
httpd.conf.fixed: httpd.conf-v1 httpd.conf.fixed: httpd.conf
-@cp httpd.conf-v1 httpd.conf.fixed -@cp httpd.conf httpd.conf.fixed
@if [ -x /usr/local/libexec/apache/mod_auth_mysql.so ]; then \ @if [ -x /usr/local/libexec/apache/mod_auth_mysql.so ]; then \
sed -i "" -e '/^LoadModule auth_mysql/s/libauth/mod_auth/' httpd.conf.fixed; \ sed -i "" -e '/^LoadModule auth_mysql/s/libauth/mod_auth/' httpd.conf.fixed; \
echo "Updated httpd.conf for auth_mysql"; \ echo "Updated httpd.conf for auth_mysql"; \
...@@ -106,14 +116,20 @@ ifeq ($(SCRIPT_HACK),1) ...@@ -106,14 +116,20 @@ ifeq ($(SCRIPT_HACK),1)
endif endif
ifeq ($(APACHE_VERSION),22) ifeq ($(APACHE_VERSION),22)
install: install-dirs install-scripts httpd.conf-v2 install: install-dirs install-scripts httpd.conf
$(INSTALL_DATA) httpd.conf-v2 $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf $(INSTALL_APACHE_CONFIG)/httpd.conf
control-install: install-dirs install-scripts httpd.conf-ops
$(INSTALL_DATA) httpd.conf-ops $(INSTALL_APACHE_CONFIG)/httpd.conf
utah: httpd.conf.utah httpd.conf-ops.utah
else else
install: install-dirs install-scripts httpd.conf.fixed install: install-dirs install-scripts httpd.conf.fixed
$(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
endif
control-install: install-dirs install-scripts httpd.conf-ops.fixed control-install: install-dirs install-scripts httpd.conf-ops.fixed
$(INSTALL_DATA) httpd.conf-ops.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf-ops.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
endif
install-php-ini: php.ini install-php-ini: php.ini
$(INSTALL_DATA) php.ini $(INSTALL_PHP_CONFIG)/php.ini $(INSTALL_DATA) php.ini $(INSTALL_PHP_CONFIG)/php.ini
......
This diff is collapsed.
This diff is collapsed.
...@@ -367,23 +367,42 @@ DocumentRoot "@prefix@/www/" ...@@ -367,23 +367,42 @@ DocumentRoot "@prefix@/www/"
allow from 155.98.60. allow from 155.98.60.
</Directory> </Directory>
# No longer use this.
<Directory @prefix@/webglimpse> <Directory @prefix@/webglimpse>
Options All MultiViews Options All MultiViews
AllowOverride All AllowOverride All
Order allow,deny Order deny,allow
Allow from all Deny from all
</Directory> </Directory>
# Utah only.
<Directory @prefix@/www/cricket> <Directory @prefix@/www/cricket>
Options ExecCGI SymLinksIfOwnerMatch Options ExecCGI SymLinksIfOwnerMatch
AddHandler cgi-script .cgi AddHandler cgi-script .cgi
</Directory> </Directory>
# Overridden below if PGENI defined.
<Directory "@prefix@/www/protogeni">
AllowOverride None
Order deny,allow
deny from all
</Directory>
# Development trees
<Directory @prefix@/devel/*/www> <Directory @prefix@/devel/*/www>
Options +ExecCGI Options +ExecCGI
AllowOverride All AllowOverride All
</Directory> </Directory>
<Directory @prefix@/www/dev>
# Allow .htaccess files in dev trees
AllowOverride All
Order deny,allow
deny from all
# Add your allow statements here.
</Directory>
# No longer use this.
<Directory @prefix@/www/webdb> <Directory @prefix@/www/webdb>
AllowOverride None AllowOverride None
Order deny,allow Order deny,allow
...@@ -442,7 +461,7 @@ DocumentRoot "@prefix@/www/" ...@@ -442,7 +461,7 @@ DocumentRoot "@prefix@/www/"
# of a username on the system (depending on home directory # of a username on the system (depending on home directory
# permissions). # permissions).
# #
UserDir disable UserDir disabled
# #
# To enable requests to /~user/ to serve the user's public_html # To enable requests to /~user/ to serve the user's public_html
...@@ -574,8 +593,8 @@ LogLevel warn ...@@ -574,8 +593,8 @@ LogLevel warn
# The following directives define some format nicknames for use with # The following directives define some format nicknames for use with
# a CustomLog directive (see below). # a CustomLog directive (see below).
# #
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t %T \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%h %l %u %t %T \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent LogFormat "%{User-agent}i" agent
...@@ -628,9 +647,9 @@ ServerSignature On ...@@ -628,9 +647,9 @@ ServerSignature On
# We include the /icons/ alias for FancyIndexed directory listings. If you # We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out. # do not use FancyIndexing, you may comment this out.
# #
Alias /icons/ "/var/www/icons/" Alias /icons/ "/usr/local/www/apache22/icons/"
<Directory "/var/www/icons"> <Directory "/usr/local/www/apache22/icons">
Options Indexes MultiViews FollowSymLinks Options Indexes MultiViews FollowSymLinks
AllowOverride None AllowOverride None
Order allow,deny Order allow,deny
...@@ -653,17 +672,21 @@ Alias /icons/ "/var/www/icons/" ...@@ -653,17 +672,21 @@ Alias /icons/ "/var/www/icons/"
# The same rules about trailing "/" apply to ScriptAlias directives as to # The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias. # Alias.
# #
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
# #
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured. # CGI directory exists, if you have that configured.
# #
<Directory "/var/www/cgi-bin"> <Directory "/usr/local/www/apache22/cgi-bin">
AllowOverride None AllowOverride None
Options None Options None
Order allow,deny Order deny,allow
Allow from all Deny from all
</Directory>
<Directory "/usr/local/www">
Options SymLinksIfOwnerMatch
</Directory> </Directory>
# #
...@@ -1093,6 +1116,15 @@ LogLevel warn ...@@ -1093,6 +1116,15 @@ LogLevel warn
ErrorLog @prefix@/log/apache_ssl_error_log ErrorLog @prefix@/log/apache_ssl_error_log
TransferLog @prefix@/log/apache_ssl_access_log TransferLog @prefix@/log/apache_ssl_access_log
LogFormat "%h %l %u %t %T \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
#
# Turn off TRACE and TRACK in the SSL virt host too
#
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
# SSL Engine Switch: # SSL Engine Switch:
# Enable/Disable SSL for this virtual host. # Enable/Disable SSL for this virtual host.
SSLEngine on SSLEngine on
...@@ -1192,7 +1224,7 @@ SSLCertificateKeyFile /usr/local/etc/apache22/ssl.key/www.@OURDOMAIN@.key ...@@ -1192,7 +1224,7 @@ SSLCertificateKeyFile /usr/local/etc/apache22/ssl.key/www.@OURDOMAIN@.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$"> <Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars SSLOptions +StdEnvVars
</Files> </Files>
<Directory "/var/www/cgi-bin"> <Directory "/usr/local/www/apache22/cgi-bin">
SSLOptions +StdEnvVars SSLOptions +StdEnvVars
</Directory> </Directory>
......
This diff is collapsed.
...@@ -7397,7 +7397,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -7397,7 +7397,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
$eventfiles \ $eventfiles \
$winfiles \ $winfiles \
$pelabfiles \ $pelabfiles \
apache/GNUmakefile apache/httpd.conf-v1 apache/httpd.conf-v2 apache/php.ini \ apache/GNUmakefile apache/php.ini \
xmlrpc/GNUmakefile xmlrpc/emulabclient.py xmlrpc/emulabserver.py \ xmlrpc/GNUmakefile xmlrpc/emulabclient.py xmlrpc/emulabserver.py \
xmlrpc/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \ xmlrpc/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \
xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \ xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \
......
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group. # Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
AC_PREREQ(2.62) AC_PREREQ(2.62)
...@@ -1101,7 +1101,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -1101,7 +1101,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
$eventfiles \ $eventfiles \
$winfiles \ $winfiles \
$pelabfiles \ $pelabfiles \
apache/GNUmakefile apache/httpd.conf-v1 apache/httpd.conf-v2 apache/php.ini \ apache/GNUmakefile apache/php.ini \
xmlrpc/GNUmakefile xmlrpc/emulabclient.py xmlrpc/emulabserver.py \ xmlrpc/GNUmakefile xmlrpc/emulabclient.py xmlrpc/emulabserver.py \
xmlrpc/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \ xmlrpc/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \
xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \ xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2003-2011 University of Utah and the Flux Group. # Copyright (c) 2003-2012 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -115,7 +115,9 @@ my $ROOT_AUTHKEY = "/root/.ssh/authorized_keys"; ...@@ -115,7 +115,9 @@ my $ROOT_AUTHKEY = "/root/.ssh/authorized_keys";
my $CHECKUPUSER = "elabckup"; my $CHECKUPUSER = "elabckup";
my $APACHE_ETCDIR = "/usr/local/etc/apache"; my $APACHE_ETCDIR = "@INSTALL_APACHE_CONFIG@";
my $APACHE_VERSION = @APACHE_VERSION@;
my $APACHE_START = "@APACHE_START_COMMAND@";
my $SUDOERS = "/usr/local/etc/sudoers"; my $SUDOERS = "/usr/local/etc/sudoers";
my $HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf"; my $HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf";
my $PHP_INI = "/usr/local/etc/php.ini"; my $PHP_INI = "/usr/local/etc/php.ini";
...@@ -1157,7 +1159,11 @@ Phase "rc.conf", "Adding testbed content to $RCCONF", sub { ...@@ -1157,7 +1159,11 @@ Phase "rc.conf", "Adding testbed content to $RCCONF", sub {
qq|inetd_flags="-wW -R 0"|, qq|inetd_flags="-wW -R 0"|,
qq|syslogd_flags=""|, qq|syslogd_flags=""|,
qq|tftpd_flags="-lvvvv -C 40 -s /tftpboot"|, qq|tftpd_flags="-lvvvv -C 40 -s /tftpboot"|,
qq|apache_enable="YES"|, (("$APACHE_VERSION" eq "22") ?
(qq|apache22_enable="YES"|,
qq|apache22_flags="-DSSL"|) :
(qq|apache_enable="YES"|,
qq|apache_flags="-DSSL"|)),
qq|pubsubd_flags="-T 10"|); qq|pubsubd_flags="-T 10"|);
# Starting at FreeBSD 6 we use the default version of bind, not the port. # Starting at FreeBSD 6 we use the default version of bind, not the port.
...@@ -1534,25 +1540,27 @@ Phase "sslcerts", "Setting up SSL certificates", sub { ...@@ -1534,25 +1540,27 @@ Phase "sslcerts", "Setting up SSL certificates", sub {
ExecQuietFatal("$CP $TOP_OBJDIR/ssl/$APACHE_KEYPEM ". ExecQuietFatal("$CP $TOP_OBJDIR/ssl/$APACHE_KEYPEM ".
" $APACHE_KEYFILE"); " $APACHE_KEYFILE");
}; };
Phase "rc.d", "Installing Apache startup file", sub { if ($APACHE_VERSION eq "1.3") {
DoneIfExists("$RCDIR/apache.sh"); Phase "rc.d", "Installing Apache startup file", sub {
my $sfile; DoneIfExists($APACHE_START);
if ($FBSD_MAJOR > 6) { my $sfile;
$sfile = "$RCDIR/apache"; if ($FBSD_MAJOR > 6) {
} else { $sfile = "$RCDIR/apache";
$sfile = "$RCDIR/apache.sh.sample"; } else {
} $sfile = "$RCDIR/apache.sh.sample";
ExecQuietFatal("mv $sfile $RCDIR/apache.sh"); }
if ($FBSD_MAJOR == 6) { ExecQuietFatal("mv $sfile $APACHE_START");
ExecQuietFatal("sed -i .orig ". if ($FBSD_MAJOR == 6) {
"-e 's/^apache_enable/#apache_enable/' ". ExecQuietFatal("sed -i .orig ".
"$RCDIR/apache.sh"); "-e 's/^apache_enable/#apache_enable/' ".
ExecQuietFatal("/bin/rm -f $RCDIR/apache.sh.orig"); "$APACHE_START");
} ExecQuietFatal("/bin/rm -f ${APACHE_START}.orig");
}; }
};
}
Phase "starting", "Starting Apache server", sub { Phase "starting", "Starting Apache server", sub {
DoneIfExists("$VARRUN/httpd.pid"); DoneIfExists("$VARRUN/httpd.pid");
ExecQuietFatal("$RCDIR/apache.sh start"); ExecQuietFatal("$APACHE_START start");
}; };
}; };
if ($FBSD_MAJOR > 4) { if ($FBSD_MAJOR > 4) {
...@@ -1565,10 +1573,12 @@ Phase "sslcerts", "Setting up SSL certificates", sub { ...@@ -1565,10 +1573,12 @@ Phase "sslcerts", "Setting up SSL certificates", sub {
ExecQuietFatal("$SCP $TOP_OBJDIR/ssl/$APACHE_KEYPEM_OPS ". ExecQuietFatal("$SCP $TOP_OBJDIR/ssl/$APACHE_KEYPEM_OPS ".
" ${USERNODE}:$APACHE_KEYFILE_OPS"); " ${USERNODE}:$APACHE_KEYFILE_OPS");
}; };
Phase "rc.d", "Installing Apache startup file", sub { if ($APACHE_VERSION eq "1.3") {
ExecQuietFatal("$SCP $RCDIR/apache.sh ". Phase "rc.d", "Installing Apache startup file", sub {
" ${USERNODE}:$RCDIR/apache.sh"); ExecQuietFatal("$SCP $APACHE_START".
}; " ${USERNODE}:${APACHE_START}");
};
}
}; };
} }
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2003-2011 University of Utah and the Flux Group. # Copyright (c) 2003-2012 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -238,7 +238,8 @@ my $CRONTAB = "/etc/crontab"; ...@@ -238,7 +238,8 @@ my $CRONTAB = "/etc/crontab";
my $AUTHKEYS = "/root/.ssh/authorized_keys"; my $AUTHKEYS = "/root/.ssh/authorized_keys";
my $SMBCONF_FILE = "/usr/local/etc/smb.conf"; my $SMBCONF_FILE = "/usr/local/etc/smb.conf";
my $SMBCONF_HEAD = "$SMBCONF_FILE.head"; my $SMBCONF_HEAD = "$SMBCONF_FILE.head";
my $APACHE_ETCDIR = "/usr/local/etc/apache"; my $APACHE_ETCDIR = "@INSTALL_APACHE_CONFIG@";
my $APACHE_VERSION = @APACHE_VERSION@;
my $HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf"; my $HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf";
my $PHP_INI = "/usr/local/etc/php.ini"; my $PHP_INI = "/usr/local/etc/php.ini";
my $WWWDIR = "/usr/local/www/data"; my $WWWDIR = "/usr/local/www/data";
...@@ -673,7 +674,11 @@ Phase "rc.conf", "Adding testbed content to rc.conf", sub { ...@@ -673,7 +674,11 @@ Phase "rc.conf", "Adding testbed content to rc.conf", sub {
qq|nfs_server_flags="-u -t -n 16"|, qq|nfs_server_flags="-u -t -n 16"|,
qq|mountd_flags="-r -p 900"|, qq|mountd_flags="-r -p 900"|,
(($ISFS && $WINSUPPORT) ? qq|smbd_enable="YES"| : ()), (($ISFS && $WINSUPPORT) ? qq|smbd_enable="YES"| : ()),
qq|apache_enable="YES"|, (("$APACHE_VERSION" eq "22") ?
(qq|apache22_enable="YES"|,
qq|apache22_flags="-DSSL"|) :
(qq|apache_enable="YES"|,
qq|apache_flags="-DSSL"|)),
qq|syslogd_flags=""|, qq|syslogd_flags=""|,
($CVSSUPPORT ? qq|cvsd_enable="YES"| : ()), ($CVSSUPPORT ? qq|cvsd_enable="YES"| : ()),
qq|pubsubd_flags="-T 10"|); qq|pubsubd_flags="-T 10"|);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment