Commit 96bc3d62 authored by Leigh Stoller's avatar Leigh 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
# 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.
#
#
......@@ -22,16 +22,17 @@ endif
include $(OBJDIR)/Makeconf
CONFIG_FILES = httpd.conf-ops php.ini
CONFIG_FILES = httpd.conf httpd.conf-ops php.ini
#
# Move to Apache 22 ...
#
ifeq ($(APACHE_VERSION),22)
CONFIG_FILES += httpd.conf-v2
# For VPATH.
MOSTLY_SRCDIRS = ${SRCDIR}/v2
SCRIPT_HACK = 0
else
CONFIG_FILES += httpd.conf-v1
MOSTLY_SRCDIRS = ${SRCDIR}/v1
endif
INSTALL_PHP_CONFIG = /usr/local/etc
......@@ -43,6 +44,15 @@ all: $(CONFIG_FILES)
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
$(INSTALL_APACHE_CONFIG)/%: %
@echo "Installing $<"
......@@ -57,10 +67,10 @@ $(INSTALL_APACHE_CONFIG)/%: %
#
# 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
-@cp httpd.conf-v1 httpd.conf.fixed
httpd.conf.fixed: httpd.conf
-@cp httpd.conf httpd.conf.fixed
@if [ -x /usr/local/libexec/apache/mod_auth_mysql.so ]; then \
sed -i "" -e '/^LoadModule auth_mysql/s/libauth/mod_auth/' httpd.conf.fixed; \
echo "Updated httpd.conf for auth_mysql"; \
......@@ -106,14 +116,20 @@ ifeq ($(SCRIPT_HACK),1)
endif
ifeq ($(APACHE_VERSION),22)
install: install-dirs install-scripts httpd.conf-v2
$(INSTALL_DATA) httpd.conf-v2 $(INSTALL_APACHE_CONFIG)/httpd.conf
install: install-dirs install-scripts 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
install: install-dirs install-scripts httpd.conf.fixed
$(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
endif
control-install: install-dirs install-scripts httpd.conf-ops.fixed
$(INSTALL_DATA) httpd.conf-ops.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
endif
install-php-ini: 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/"
allow from 155.98.60.
</Directory>
# No longer use this.
<Directory @prefix@/webglimpse>
Options All MultiViews
AllowOverride All
Order allow,deny
Allow from all
Order deny,allow
Deny from all
</Directory>
# Utah only.
<Directory @prefix@/www/cricket>
Options ExecCGI SymLinksIfOwnerMatch
AddHandler cgi-script .cgi
</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>
Options +ExecCGI
AllowOverride All
</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>
AllowOverride None
Order deny,allow
......@@ -442,7 +461,7 @@ DocumentRoot "@prefix@/www/"
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable
UserDir disabled
#
# To enable requests to /~user/ to serve the user's public_html
......@@ -574,8 +593,8 @@ LogLevel warn
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %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 \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t %T \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
......@@ -628,9 +647,9 @@ ServerSignature On
# We include the /icons/ alias for FancyIndexed directory listings. If you
# 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
AllowOverride None
Order allow,deny
......@@ -653,17 +672,21 @@ Alias /icons/ "/var/www/icons/"
# The same rules about trailing "/" apply to ScriptAlias directives as to
# 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
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
<Directory "/usr/local/www/apache22/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
Order deny,allow
Deny from all
</Directory>
<Directory "/usr/local/www">
Options SymLinksIfOwnerMatch
</Directory>
#
......@@ -1093,6 +1116,15 @@ LogLevel warn
ErrorLog @prefix@/log/apache_ssl_error_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:
# Enable/Disable SSL for this virtual host.
SSLEngine on
......@@ -1192,7 +1224,7 @@ SSLCertificateKeyFile /usr/local/etc/apache22/ssl.key/www.@OURDOMAIN@.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
<Directory "/usr/local/www/apache22/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
......
This diff is collapsed.
......@@ -7397,7 +7397,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
$eventfiles \
$winfiles \
$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/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \
xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \
......
#
# 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.
#
AC_PREREQ(2.62)
......@@ -1101,7 +1101,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
$eventfiles \
$winfiles \
$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/sshxmlrpc_client.py xmlrpc/sshxmlrpc_server.py \
xmlrpc/sslxmlrpc_client.py xmlrpc/sslxmlrpc_server.py \
......
......@@ -2,7 +2,7 @@
#
# 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.
#
......@@ -115,7 +115,9 @@ my $ROOT_AUTHKEY = "/root/.ssh/authorized_keys";
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 $HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf";
my $PHP_INI = "/usr/local/etc/php.ini";
......@@ -1157,7 +1159,11 @@ Phase "rc.conf", "Adding testbed content to $RCCONF", sub {
qq|inetd_flags="-wW -R 0"|,
qq|syslogd_flags=""|,
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"|);
# 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 {
ExecQuietFatal("$CP $TOP_OBJDIR/ssl/$APACHE_KEYPEM ".
" $APACHE_KEYFILE");
};
Phase "rc.d", "Installing Apache startup file", sub {
DoneIfExists("$RCDIR/apache.sh");
my $sfile;
if ($FBSD_MAJOR > 6) {
$sfile = "$RCDIR/apache";
} else {
$sfile = "$RCDIR/apache.sh.sample";
}
ExecQuietFatal("mv $sfile $RCDIR/apache.sh");
if ($FBSD_MAJOR == 6) {
ExecQuietFatal("sed -i .orig ".
"-e 's/^apache_enable/#apache_enable/' ".
"$RCDIR/apache.sh");
ExecQuietFatal("/bin/rm -f $RCDIR/apache.sh.orig");
}
};
if ($APACHE_VERSION eq "1.3") {
Phase "rc.d", "Installing Apache startup file", sub {
DoneIfExists($APACHE_START);
my $sfile;
if ($FBSD_MAJOR > 6) {
$sfile = "$RCDIR/apache";
} else {
$sfile = "$RCDIR/apache.sh.sample";
}
ExecQuietFatal("mv $sfile $APACHE_START");
if ($FBSD_MAJOR == 6) {
ExecQuietFatal("sed -i .orig ".
"-e 's/^apache_enable/#apache_enable/' ".
"$APACHE_START");
ExecQuietFatal("/bin/rm -f ${APACHE_START}.orig");
}
};
}
Phase "starting", "Starting Apache server", sub {
DoneIfExists("$VARRUN/httpd.pid");
ExecQuietFatal("$RCDIR/apache.sh start");
ExecQuietFatal("$APACHE_START start");
};
};
if ($FBSD_MAJOR > 4) {
......@@ -1565,10 +1573,12 @@ Phase "sslcerts", "Setting up SSL certificates", sub {
ExecQuietFatal("$SCP $TOP_OBJDIR/ssl/$APACHE_KEYPEM_OPS ".
" ${USERNODE}:$APACHE_KEYFILE_OPS");
};
Phase "rc.d", "Installing Apache startup file", sub {
ExecQuietFatal("$SCP $RCDIR/apache.sh ".
" ${USERNODE}:$RCDIR/apache.sh");
};
if ($APACHE_VERSION eq "1.3") {
Phase "rc.d", "Installing Apache startup file", sub {
ExecQuietFatal("$SCP $APACHE_START".
" ${USERNODE}:${APACHE_START}");
};
}
};
}
};
......
......@@ -2,7 +2,7 @@
#
# 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.
#
......@@ -238,7 +238,8 @@ my $CRONTAB = "/etc/crontab";
my $AUTHKEYS = "/root/.ssh/authorized_keys";
my $SMBCONF_FILE = "/usr/local/etc/smb.conf";
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 $PHP_INI = "/usr/local/etc/php.ini";
my $WWWDIR = "/usr/local/www/data";
......@@ -673,7 +674,11 @@ Phase "rc.conf", "Adding testbed content to rc.conf", sub {
qq|nfs_server_flags="-u -t -n 16"|,
qq|mountd_flags="-r -p 900"|,
(($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=""|,
($CVSSUPPORT ? qq|cvsd_enable="YES"| : ()),
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