EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08000


< 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 Norbert,

Thanks for your response and advice. I went for a "wildcard" certificate which from what I understand will allow me to cover everything under *.example.com. My understanding and reality might not match up exactly...

The output of apache2ctl -S is:

VirtualHost configuration:
*:443                  premier-textiles-enquiries.com (/etc/apache2/sites-enabled/premier-textiles-enquiries.com-le-ssl.conf:6)
*:80                   is a NameVirtualHost
         default server localhost.localdomain (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost localhost.localdomain (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost eprints.premier-textiles-enquiries.com (/usr/share/eprints/cfg/apache/kerwin_repo.conf:9)
         port 80 namevhost eprints.premier-textiles-enquiries.com (/usr/share/eprints/cfg/apache/kerwin_repo.conf:17)
         port 80 namevhost premier-textiles-enquiries (/usr/share/eprints/cfg/apache/kerwinrepo.conf:9)
         port 80 namevhost premier-textiles-enquiries.com (/usr/share/eprints/cfg/apache/kerwinrepo.conf:15)
         port 80 namevhost premier-textiles-enquiries.com (/etc/apache2/sites-enabled/premier-textiles-enquiries.com-le-ssl.conf:1)
         port 80 namevhost www.premier-textiles-enquiries.com (/etc/apache2/sites-enabled/premier-textiles-enquiries.com.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: MODPERL2
User: name="www-data" id=33
Group: name="www-data" id=33

kerwin_repo is my main archive. kerwinrepo was an archive I set up totally incorrectly and doesn't matter. I think I may disable the eprints conf and go back to basics with this. I should also add that the url is meaningless, it just so happened that this was the only spare functioning one I had when I started.

Thanks,
James

On Wed, Oct 23, 2019 at 10:40 PM EDER Norbert <eder@iiasa.ac.at> wrote:

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/