EPrints Technical Mailing List Archive

Message: #06170


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Antwort: technical question: one archive with two domains



Hey,
thank you very much for your answers.
I tried to configure a test repository like you suggested.
I tried to configure /cfg.d/10_core.pl manually and added a ServerAlias at the apache config files. This didn't work, so i used epadmin config-core to add a second url. I tried to use a second virtual host in the apache config instead of ServerAlias, too. But my problem still remains: if i access the repo using the new domain, i reach it, but it is equivalent to a redirect. All links are hardlinks, if i use one of them, i get redirected to the old domain. It seems that changing 10_core.pl does not affect my repo in any way. Reloading or regenerating with epadmin does not help.
So i tried to set up a new test repo with 'epadmin create' and defined a second url in this process, setting redirecting to 'no'. The result still remains the same - i can access it with both domains, but all links point to the main domain.
Do you have any ideas of what I could have done wrong?
Using apaches mod_substitute is still an option, but I think that there should be a better solution.
Thank you very much,
best regards

Thorsten Buelo

University of Cologne
Institut fuer Informatik

Message: 1
Date: Wed, 18 Jan 2017 08:14:31 +0100
From: martin.braendle@id.uzh.ch
Subject: [EP-tech] Antwort: technical question: one archive with two
        domains
To: eprints-tech@ecs.soton.ac.uk
Message-ID:
        <OF46765916.67BC9E18-ONC12580AC.00262D37-C12580AC.0027C817@lotus.uzh.ch">OF46765916.67BC9E18-ONC12580AC.00262D37-C12580AC.0027C817@lotus.uzh.ch>

Content-Type: text/plain; charset="iso-8859-1"


Hi,

it is no problem to configure several domains for the same archive:

in  archives/{yourrepo}/cfg/cfg.d/10_core.pl  :

$c->{host} = 'domain1';
$c->{aliases} = [ 'domain2', 'domain3', ...]


in cfg/apache/yourrepo.conf

<VirtualHost *:80>
ServerName domain1
ServerAlias domain2
ServerAlias domain3
.
.


In archives/{yourrepo}/ssl/securevhost.conf

<VirtualHost *:443>
ServerName domain1
ServerAlias domain2
ServerAlias domain3
.
.
.


Of course, all the domains must be registered as Aliases in the DNS. And
the SSL certificates must contain all the domains.

Our observation ist that usually the domain the user starts with is used
during the visit of the repo website. Only during login, the URL switches
to the main domain.
We have no problem with that change.

Best regards,

Martin


--
Dr. Martin Br?ndle
Zentrale Informatik
Universit?t Z?rich
Stampfenbachstr. 73
CH-8006 Z?rich
-

On 17/01/2017 12:01, Thorsten B?lo wrote:
> Hey there,
> I have a problem with our running eprints archive:
> It is necessary to access the same archive using two different
> domains, so I configured two apache.conf include files with different
> domains using the same 'PerlSetVar EPrints_ArchiveID'. This works fine
> - both domains point to the same archive - but the html files
> generated by eprints include hardlinks to the first domain. Is there
> any option to make eprints using links to relative URLs? Or is there
> another way
> to solve my problem?
> It would be great if you had some suggestions.
>
> Thank you very much,
>
> Thorsten Buelo
>
> University of Cologne
> Institut f?r Informatik
> www.informatik.uni-koeln.de <http://www.informatik.uni-koeln.de>