Commit 4a34c6e5 authored by Leigh Stoller's avatar Leigh Stoller

In an attempt to fix the apache certificate problems, Mike and I decided to

split into two separate apache servers, one for the web interface and
another for all the geni RPC ports. Shot in the dark, we are out of ideas.
parent 622d5318
# #
# Copyright (c) 2002-2012 University of Utah and the Flux Group. # Copyright (c) 2002-2015 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -27,6 +27,7 @@ SRCDIR = @srcdir@ ...@@ -27,6 +27,7 @@ SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = .. OBJDIR = ..
SUBDIR = apache SUBDIR = apache
PGENISUPPORT = @PROTOGENI_SUPPORT@
SYSTEM := $(shell uname -s) SYSTEM := $(shell uname -s)
ifeq ($(SYSTEM),FreeBSD) ifeq ($(SYSTEM),FreeBSD)
...@@ -41,6 +42,10 @@ include $(OBJDIR)/Makeconf ...@@ -41,6 +42,10 @@ include $(OBJDIR)/Makeconf
OPS_FILES = httpd.conf-ops php.ini OPS_FILES = httpd.conf-ops php.ini
CONFIG_FILES = httpd.conf $(OPS_FILES) CONFIG_FILES = httpd.conf $(OPS_FILES)
ifeq ($(PGENISUPPORT),1)
CONFIG_GENI = httpd-geni.conf
CONFIG_FILES += $(CONFIG_GENI)
endif
# #
# Move to Apache 22 ... # Move to Apache 22 ...
...@@ -136,12 +141,17 @@ ifeq ($(SCRIPT_HACK),1) ...@@ -136,12 +141,17 @@ ifeq ($(SCRIPT_HACK),1)
endif endif
ifeq ($(APACHE_VERSION),22) ifeq ($(APACHE_VERSION),22)
install: install-dirs install-scripts httpd.conf install: install-dirs install-scripts httpd.conf pgeni-install
$(INSTALL_DATA) httpd.conf $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf $(INSTALL_APACHE_CONFIG)/httpd.conf
control-install: install-dirs install-scripts httpd.conf-ops control-install: install-dirs install-scripts httpd.conf-ops
$(INSTALL_DATA) httpd.conf-ops $(INSTALL_APACHE_CONFIG)/httpd.conf $(INSTALL_DATA) httpd.conf-ops $(INSTALL_APACHE_CONFIG)/httpd.conf
pgeni-install: $(CONFIG_GENI)
ifeq ($(PGENISUPPORT),1)
$(INSTALL_DATA) httpd-geni.conf $(INSTALL_APACHE_CONFIG)/httpd-geni.conf
endif
utah: httpd.conf.utah httpd.conf-ops.utah 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
......
This diff is collapsed.
This diff is collapsed.
...@@ -334,6 +334,7 @@ $APACHE_VERSION = "@APACHE_VERSION@"; ...@@ -334,6 +334,7 @@ $APACHE_VERSION = "@APACHE_VERSION@";
$APACHE_START_COMMAND = "@APACHE_START_COMMAND@"; $APACHE_START_COMMAND = "@APACHE_START_COMMAND@";
$APACHE_ETCDIR = "$INSTALL_APACHE_CONFIG"; $APACHE_ETCDIR = "$INSTALL_APACHE_CONFIG";
$HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf"; $HTTPD_CONF = "$APACHE_ETCDIR/httpd.conf";
$HTTPD_GENI_CONF = "$APACHE_ETCDIR/httpd-geni.conf";
$APACHE_CERTPEM = "apache.pem"; $APACHE_CERTPEM = "apache.pem";
$APACHE_KEYPEM = "apache.key"; $APACHE_KEYPEM = "apache.key";
$APACHE_CERTFILE = "$APACHE_ETCDIR/ssl.crt/www.${OURDOMAIN}.crt"; $APACHE_CERTFILE = "$APACHE_ETCDIR/ssl.crt/www.${OURDOMAIN}.crt";
......
...@@ -30,7 +30,10 @@ sub Install($$$) ...@@ -30,7 +30,10 @@ sub Install($$$)
qq|tftpd_flags="-lvvvv -C 40 -s /tftpboot"|, qq|tftpd_flags="-lvvvv -C 40 -s /tftpboot"|,
(("$APACHE_VERSION" eq "22") ? (("$APACHE_VERSION" eq "22") ?
(qq|apache22_enable="YES"|, (qq|apache22_enable="YES"|,
qq|apache22_flags="-DSSL"|) : qq|apache22_flags="-DSSL"|,
qq|apache22_profiles="www"|,
"apache22_www_configfile=\"${HTTPD_CONF}\"",
qq|apache22_www_enable="YES"|) :
(qq|apache_enable="YES"|, (qq|apache_enable="YES"|,
qq|apache_flags="-DSSL"|)), qq|apache_flags="-DSSL"|)),
qq|pubsubd_flags="-T 10"|); qq|pubsubd_flags="-T 10"|);
......
...@@ -92,10 +92,7 @@ my $PKG_INFO = "/usr/sbin/pkg_info"; ...@@ -92,10 +92,7 @@ my $PKG_INFO = "/usr/sbin/pkg_info";
my $FETCH = "/usr/bin/fetch"; my $FETCH = "/usr/bin/fetch";
my $OPENSSL = "/usr/bin/openssl"; my $OPENSSL = "/usr/bin/openssl";
my $FIXROOTCERT = "$TB/sbin/fixrootcert"; my $FIXROOTCERT = "$TB/sbin/fixrootcert";
my $APACHE_START = "@APACHE_START_COMMAND@"; my $APACHEPREFIX = ("@APACHE_VERSION@" == "22" ? "apache22" : "apache");
my $APACHE_CONF = "@INSTALL_APACHE_CONFIG@/httpd.conf";
my $APACHE_FLAGS = ("@APACHE_VERSION@" == "22" ?
"apache22_flags" : "apache_flags");
# un-taint path # un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin'; $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
...@@ -325,13 +322,20 @@ Phase "sslcnf", "Updating ssl syscert.cnf", sub { ...@@ -325,13 +322,20 @@ Phase "sslcnf", "Updating ssl syscert.cnf", sub {
ExecQuietFatal("$GMAKE -C @top_builddir@/ssl install-conf"); ExecQuietFatal("$GMAKE -C @top_builddir@/ssl install-conf");
}; };
Phase "apache", "Updating apache config", sub { Phase "apache", "Updating apache config", sub {
DoneIfIdentical("@top_builddir@/apache/httpd.conf", "$HTTPD_CONF"); if (-e $HTTPD_GENI_CONF) {
BackUpFileFatal("$HTTPD_CONF"); DoneIfIdentical("@top_builddir@/apache/httpd-geni.conf",
ExecQuietFatal("$GMAKE -C @top_builddir@/apache install"); "$HTTPD_GENI_CONF");
BackUpFileFatal("$HTTPD_GENI_CONF");
}
ExecQuietFatal("$GMAKE -C @top_builddir@/apache pgeni-install");
}; };
Phase "rcconf", "Updating $RCCONF", sub { Phase "rcconf", "Updating $RCCONF", sub {
DoneIfEdited($RCCONF); DoneIfEdited($RCCONF);
AppendToFileFatal($RCCONF, "$APACHE_FLAGS=\"-DSSL -DPGENI\""); AppendToFileFatal($RCCONF,
"${APACHEPREFIX}_flags=\"-DSSL -DPGENI\"",
"${APACHEPREFIX}_profiles=\"www geni\"",
"${APACHEPREFIX}_geni_configfile=\"$HTTPD_GENI_CONF\"",
"${APACHEPREFIX}_geni_enable=\"YES\"");
}; };
# #
......
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