Trying to force port 80 -> 443 on Tomcat 7, Dspace 6.3

29 views
Skip to first unread message

Wally Grotophorst

unread,
Feb 7, 2020, 10:25:31 PM2/7/20
to DSpace Technical Support
Trying to enable https on our dSpace installation.  I'm trying to do this without putting Apache in front of our Tomcat 7 instance that serves up dSpace.

One other wrinkle: 

I want to run DSpace on port 80 and 443 because I don't want port numbers in the URLs

I have the site working as a http:// site and as an https:// site



What I can't get working is moving users who come in on http://mars.gmu.edu over automatically to https://mars.gmu.edu.

Have tried various settings in web.xml but when I get one that DOES handle the automatic redirection of users from port 80 to port 443, it breaks some internal connections...such that I see my communities listed on the xmlui "home page" but no items, no facets, etc.  Maybe that's a SOLR connection issue?  Not sure.

Any suggestions welcomed...

Wally Grotophorst
University Libraries
George Mason University
Fairfax, Virginia

Tim Donohue

unread,
Feb 10, 2020, 3:47:16 PM2/10/20
to Wally Grotophorst, DSpace Technical Support
Hi Wally,

I know you mentioned you'd like to do this all in Tomcat, but I've found it much easier to force HTTPS in Apache itself.  We've got a guide in the Installation Docs for setting up Apache on port 80 / 443 in front of DSpace:

https://wiki.lyrasis.org/display/DSDOC6x/Installing+DSpace#InstallingDSpace-UsingSSLonApacheHTTPDinfrontofTomcat(runningonports80and443)

When using Apache, once you have DSpace running on both 80 and 443, you can use a simple RewriteRule to redirect everything from port 80 to 443.  That'd look something like this in your <VirtualHost *:80> for port 80

# Redirect all HTTP requests to HTTPS
RewriteEngine On
RewriteRule ^(.*) https://mars.gmu.edu$1 [R=permanent,L]

Tim




From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Wally Grotophorst <wally.gr...@gmail.com>
Sent: Friday, February 7, 2020 9:25 PM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: [dspace-tech] Trying to force port 80 -> 443 on Tomcat 7, Dspace 6.3
 
--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/79cde06e-a87e-4275-a4ee-438d85c7e136%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages