EPrints Technical Mailing List Archive

Message: #07998


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

Re: [EP-tech] EPrints and website subdomains


Hi James,

 

maybe send us the output from “apache2ctl -S” to see more details from your config…

And you need

·        A multidomain SSL Certificate or

·        2 normal SSL certificates

to have this domains via https running….

 

best wishes,

Norbert

 

Von: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> Im Auftrag von Newman D.R. via Eprints-tech
Gesendet: Mittwoch, 23. Oktober 2019 16:57
An: eprints-tech@ecs.soton.ac.uk; James Kerwin <jkerwin2101@gmail.com>
Betreff: Re: [EP-tech] EPrints and website subdomains

 

Hi James,

The answer to this question is somewhat dependent on what flavour of Linux and version of Apache you are running.  At best guess it seems like you might be running Apache 2.4 on RedHat.  I have tested this and think the issue lies in the way you static website has been configured where it just assumes it is the only host on your webserver.  Presumably you know where the static files are for this site, so I would grep through the Apache configuration for this path.  Then when you find this line I would add a VirtualHost around all the config in the file.  In my example I was just trying to display the welcome holding page for a different hostname I took /etc/httpd/conf.d/welcome.conf from this:

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

<Directory /usr/share/httpd/noindex>
    AllowOverride None
    Require all granted
</Directory>

Alias /.noindex.html /usr/share/httpd/noindex/index.html
Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png

###

And then added the VirtualHost encapsulation and ServerName line to give:

###

<VirtualHost *:80>
  ServerName example.com

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

<Directory /usr/share/httpd/noindex>
    AllowOverride None
    Require all granted
</Directory>

Alias /.noindex.html /usr/share/httpd/noindex/index.html
Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png

</VirtualHost>

###

Admittedly my setup did not have hosts where one was a subdomain of the other but I think this is just a bit of a red-herring and the issue is going from have one host to two and the first not expecting a second to be added and the second not being aware that the first exists as it has not been defined as its own VirtualHost like EPrints Apache configuration would have done.

Regards

David Newman

 

On 23/10/2019 14:52, James Kerwin via Eprints-tech wrote:

Hi All,

 

Short version: I'm attempting to install EPrints on my (personal) server under a subdomain. e.g. website name with random static pages is example.com. I want my EPrints installation to be accessed via eprints.example.com. I'm struggling because I don't know a lot about Apache and subdomains.

 

Long version:

I'm attempting to install Eprints 3.4 on my personal server (I only use it for practice/experimenting).

 

Initially the server ran a very simple website. Mostly static pages with some php and mysql etc. I have security certificates and there were no subdomains. I've done what I THINK I need to do to create a subdomain with my server provider (ionos) and I've managed to install EPrints and now I think it's about getting the Apache part right.

 

If I disable the eprints apache conf files I access my website via example.com and eprints.example.com and both of these take me to my usual previously existing website. If I enable the eprints apache conf files I get taken to EPrints via both example.com and eprints.example.com and I can no longer access my pre-existing website.

 

This isn't urgent as I'm only playing around in preparation for an upgrade soon. I was just hoping somebody had some experience with EPrints and subdomains. I thought I had all I needed in the way of an example as my repository is livrepository.liverpool.ac.uk. I assumed this was a subdomain and so modelled my apache config on the ones on my work server.

 

Any sort of guidance or useful resources would be a huge help.

 

Thanks,

James



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/