Re: [EP-tech] EPrints and website subdomains

James Kerwin via Eprints-tech <[email protected]>
Newsgroups gmane.comp.web.eprints.devel
Message-ID <EMEW3|536aad909e73453fe078a5bf1a179b98v9OACr14eprints-tech-bounces|ecs.soton.ac.uk|CAKkNZ9B4c68yVoGZ81GzK8tH2-dv+sxpLCL3L49jMLQ+Ab57gw@mail.gmail.com>
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 https://eur03.safelinks.protection.outlook.com/?url=www.premier-textiles-enquiries.com&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=y%2BPiglPYrQMwU31Ftpvu0g%2FxHsE4LsiuJNMs8snIMGw%3D&amp;reserved=0
(/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 <[email protected]> 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:* [email protected] <
> [email protected]> *Im Auftrag von *Newman D.R. via
> Eprints-tech
> *Gesendet:* Mittwoch, 23. Oktober 2019 16:57
> *An:* [email protected]; James Kerwin <[email protected]>
> *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
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=k6wJIAIVhFPOUJdO6znlvZIaNULNvSm79XYKuHkqkpg%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=LwO5I3lNJrAB4F6OID6vMyasH98PvanZjtAdY0Tgklc%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=k6wJIAIVhFPOUJdO6znlvZIaNULNvSm79XYKuHkqkpg%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=LwO5I3lNJrAB4F6OID6vMyasH98PvanZjtAdY0Tgklc%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=k6wJIAIVhFPOUJdO6znlvZIaNULNvSm79XYKuHkqkpg%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=LwO5I3lNJrAB4F6OID6vMyasH98PvanZjtAdY0Tgklc%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=jooUeXlG6PNpxvKscKXAfIaUscBlvyFPA3hQV2Z1uq4%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=hFPJbCmO5bj7SvvIjUwqx7clTvp%2FvS6%2BZ3hU6oO7QrM%3D&amp;reserved=0 <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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=hFPJbCmO5bj7SvvIjUwqx7clTvp%2FvS6%2BZ3hU6oO7QrM%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oZmygBerKGDaEExXSEorqbcpzCeubFDf6WDl4k%2FZc2I%3D&amp;reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=oZmygBerKGDaEExXSEorqbcpzCeubFDf6WDl4k%2FZc2I%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%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=h451UtvBN%2FKG4MnVHVm8L5jH%2FfkK9ecCKKPwRc71Ads%3D&amp;reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fforum.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C31edf3a0da6b49aa2d9f08d7592b784e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=h451UtvBN%2FKG4MnVHVm8L5jH%2FfkK9ecCKKPwRc71Ads%3D&amp;reserved=0>
>
>

*** 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.