How can I disable http connections on dSpace 6.3 and force https?

199 views
Skip to first unread message

Alejandro Lengua Vega

unread,
Dec 13, 2021, 2:40:09 PM12/13/21
to DSpace Technical Support
Hello,
I recently installed a SSL certificate in my dspace (version 6.3) server and https is working fine thanks to this configuration in server.xml
            <Connector port="443" protocol="HTTP/1.1"
connectionTimeout="20000" SSLEnabled="true" scheme="https" keystoreFile="conf/file.jks"  keystorePass="Password" clientAuth="false" sslProtocol="TLS"
                    redirectPort="8443" />

however I would like to disable the http thing and force all connections to be made via SSL. So I am trying to comment these lines

    <Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
            redirectPort="8443" />

but when I do so I get an internal error message in the https site home page

Alejandro Lengua Vega

unread,
Jan 3, 2022, 9:02:07 AM1/3/22
to DSpace Technical Support
Hello, and happy new year
Just wanted to share with you the code that I used in the main JSP file of my site
to solve this issue
<%
if(request.getScheme().equals("http")){
            String redirect = "https://mydomain.dspace/index.jsp";
            response.sendRedirect(redirect);
}
%>
Reply all
Reply to author
Forward
0 new messages