[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=XpL6TO2lDNuoxRh%2B0zYWDU7TOJCVfEs%2Byqjvi9%2BGBr0%3D&reserved=0>. I want my EPrints installation to be accessed via eprints.example.com<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints.example.com&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=8CGK0kQiHeOYZkVL2kEqX19VnzaBQyqU26NlJDSA%2FEo%3D&reserved=0>. 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<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=XpL6TO2lDNuoxRh%2B0zYWDU7TOJCVfEs%2Byqjvi9%2BGBr0%3D&reserved=0> and eprints.example.com<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints.example.com&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=8CGK0kQiHeOYZkVL2kEqX19VnzaBQyqU26NlJDSA%2FEo%3D&reserved=0> 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<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=XpL6TO2lDNuoxRh%2B0zYWDU7TOJCVfEs%2Byqjvi9%2BGBr0%3D&reserved=0> and eprints.example.com<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints.example.com&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=8CGK0kQiHeOYZkVL2kEqX19VnzaBQyqU26NlJDSA%2FEo%3D&reserved=0> 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<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flivrepository.liverpool.ac.uk&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=gYcHOdDEOn%2Frf8ZWljGQVN6wrfJtBkzTK3aE228WtII%3D&reserved=0>. 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/<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=i4800QS9PRzcfI5PO7JEUvepTBTDuIM9M6KfsSqjofc%3D&reserved=0>
*** EPrints community wiki: http://wiki.eprints.org/<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=xHy%2BEt6cNLLVpWiaiI%2FMDt5MvIqPSJ69%2Bz4a1p8ENXs%3D&reserved=0>
*** EPrints developers Forum: http://forum.eprints.org/<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&data=01%7C01%7C%7Ceef126e304d74da9ea5008d757c942db%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=lrOyjPipF8rtaYMAZ%2B3gCY3uoLBEGT8WUTccHXjhLO8%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20191023/357291aa/attachment-0001.html