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

[EP-tech] EPrints and website subdomains



Morning David,

I'll go take a look at this today. When I initially set this server up I
was on a bit of a learning curve and I've possibly done all manner of weird
things to it. This particular server is the most up to date Ubuntu 18 LTS,
if that matters.

Maybe I should set up another non-eprints subdomain with static pages in
/var/www/html and get that to work how I want, then apply it to EPrints. I
had to do more "real" work yesterday and didn't get a chance.

I have discovered that I installed the wrong flavour of EPrints; I didn't
fully appreciate the difference between Zero and Publications and now I
don't have the Bazaar on this test install. Also I didn't move over my test
database before installing EPrints so I think I'll be starting over with it
this weekend.

All good experience before I do it on the real repository server!

Thanks for your advice, I'll let you know how I get on,
James

On Wed, Oct 23, 2019 at 3:57 PM Newman D.R. <drn at ecs.soton.ac.uk> wrote:

> 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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=9o07ngs%2BL0xjnW%2FIelHX9WkaFdrybWW6xswgnBBbQNA%3D&amp;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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=l6aHtAYU4zDtqV4Cyt0372SbAG%2BJYDH16LH44FW5V%2F0%3D&amp;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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=9o07ngs%2BL0xjnW%2FIelHX9WkaFdrybWW6xswgnBBbQNA%3D&amp;reserved=0>
> and eprints.example.com
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints.example.com&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=l6aHtAYU4zDtqV4Cyt0372SbAG%2BJYDH16LH44FW5V%2F0%3D&amp;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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=9o07ngs%2BL0xjnW%2FIelHX9WkaFdrybWW6xswgnBBbQNA%3D&amp;reserved=0>
> and eprints.example.com
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints.example.com&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=l6aHtAYU4zDtqV4Cyt0372SbAG%2BJYDH16LH44FW5V%2F0%3D&amp;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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=G2irvAJKHJW3sNnF6gIINVpjdPjIbPOpcpAwj7F0kQg%3D&amp;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: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=Efkx0MU4nASzaJrE5P0DuN%2FEhq8dD0ZgxEKfMG6j1C4%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=ygzLaSyvQolugnUdFbJz1b4qkv8NOSdN8B7szxlAdEg%3D&amp;reserved=0
> *** EPrints developers Forum: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce8a06cd25f3946df1dcb08d7592a4789%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=q5iqk2ZW3jpaUKdezUpvaC%2FFgtOl96XDEe%2B%2FFoaz8Rc%3D&amp;reserved=0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20191025/84d6a167/attachment-0001.html