diff -r --unified a/bin/generate_apacheconf b/bin/generate_apacheconf --- a/bin/generate_apacheconf 2012-08-28 09:48:49.000000000 +0100 +++ b/bin/generate_apacheconf 2012-09-03 13:13:03.000000000 +0100 @@ -266,25 +266,28 @@ my $oldfile = $repository->get_conf( "config_path" )."/apache.conf"; + my $host = $repository->get_conf( "host" ); my $securehost = $repository->get_conf( "securehost" ); - if( -e $oldfile && !-e $apache_conf ) - { - open( CONF, ">$apache_conf" ) || die "Can't write to $apache_conf: $!"; - print CONF "Include $oldfile\n"; - close CONF; - } - elsif( $replace || !-e $apache_conf ) - { - my $conf = EPrints::Apache::apache_conf( $repository ); - my $backup = EPrints->system->write_config_file( $apache_conf, $conf ); - if( $backup ) + if ( $host ) { + if( -e $oldfile && !-e $apache_conf ) { - print "Wrote $backup\n" if( $noise >= 1 ); + open( CONF, ">$apache_conf" ) || die "Can't write to $apache_conf: $!"; + print CONF "Include $oldfile\n"; + close CONF; + } + elsif( $replace || !-e $apache_conf ) + { + my $conf = EPrints::Apache::apache_conf( $repository ); + my $backup = EPrints->system->write_config_file( $apache_conf, $conf ); + if( $backup ) + { + print "Wrote $backup\n" if( $noise >= 1 ); + } + print "Wrote $apache_conf\n" if( $noise >= 1 ); + + $restart_required = 1; } - print "Wrote $apache_conf\n" if( $noise >= 1 ); - - $restart_required = 1; } # Create secure include file diff -r --unified a/cgi/google_site b/cgi/google_site --- a/cgi/google_site 2012-08-28 09:48:49.000000000 +0100 +++ b/cgi/google_site 2012-09-03 13:13:03.000000000 +0100 @@ -7,8 +7,10 @@ my $session = new EPrints::Session(); exit( 1 ) unless( defined $session ); +my $host = $session->config( "host" ) || $session->config( "securehost" ); + my $url = "http://www.google.com/search?q=".$session->param( "q" ); -$url .= "+site:".$session->config( "host" ); +$url .= "+site:".$host; $session->redirect( $url ); Only in b: .git diff -r --unified a/perl_lib/EPrints/DataObj/LoginTicket.pm b/perl_lib/EPrints/DataObj/LoginTicket.pm --- a/perl_lib/EPrints/DataObj/LoginTicket.pm 2012-08-28 09:48:49.000000000 +0100 +++ b/perl_lib/EPrints/DataObj/LoginTicket.pm 2012-09-03 13:13:03.000000000 +0100 @@ -267,9 +267,12 @@ my $repo = $self->{session}; - $repo->get_request->err_headers_out->add( - 'Set-Cookie' => $self->generate_cookie - ); + if ( $repo->config( "host" ) ) { + $repo->get_request->err_headers_out->add( + 'Set-Cookie' => $self->generate_cookie + ); + } + if( $repo->config( "securehost" ) ) { $repo->get_request->err_headers_out->add( diff -r --unified a/perl_lib/EPrints/OpenArchives.pm b/perl_lib/EPrints/OpenArchives.pm --- a/perl_lib/EPrints/OpenArchives.pm 2012-08-28 09:48:49.000000000 +0100 +++ b/perl_lib/EPrints/OpenArchives.pm 2012-09-03 13:13:03.000000000 +0100 @@ -38,7 +38,7 @@ my $v1 = $repo->config( "oai", "archive_id" ); my $v2 = $repo->config( "oai", "v2", "archive_id" ); - $v1 ||= $repo->config( "host" ); + $v1 ||= $repo->config( "host" ) || $repo->config( "securehost "); $v2 ||= $v1; return $any ? ($v1, $v2) : $v2; diff -r --unified a/perl_lib/EPrints/URL.pm b/perl_lib/EPrints/URL.pm --- a/perl_lib/EPrints/URL.pm 2012-08-28 09:48:49.000000000 +0100 +++ b/perl_lib/EPrints/URL.pm 2012-09-03 13:13:03.000000000 +0100 @@ -106,6 +106,8 @@ my $uri = URI->new("", "http"); + $opts{scheme} = "https" if !$session->config( "host" ); + $opts{scheme} = "auto" unless defined $opts{scheme}; $opts{host} = "" unless defined $opts{host}; $opts{path} = "auto" unless defined $opts{path}; diff -r --unified a/tests/91_api_repository.pl b/tests/91_api_repository.pl --- a/tests/91_api_repository.pl 2012-08-28 09:48:49.000000000 +0100 +++ b/tests/91_api_repository.pl 2012-09-03 13:13:02.000000000 +0100 @@ -24,7 +24,7 @@ my $xhtml = $repo->xhtml; isa_ok( $xhtml, "EPrints::XHTML", "Get an XHTML object from the repository" ); -my $config_element = $repo->config( "host" ); +my $config_element = $repo->config( "host" ) || $repo->config( "securehost" ); ok( defined $config_element, "Get a config. element" ); my $config_element2 = $repo->config( "search", "simple" );