简体   繁体   中英

How to run IntelliJ tomcat server on https?

i need to test with Okta SSO which only allows https connection so how can i run IntelliJ tomcat server on https?

I have configured the below on c drive tomcat server using below instructions but don't know how to setup ssl on intellij tomcat server?

Done -

Prerequisite :


1)JDK installed + JAVA_HOME environment variable setup

  1. Tomcat 8.0 archieve file

Now open cmd : run this command:

cd %JAVA_HOME%/bin

Step 1: Generating keystore file : .keystore


keytool -genkey -alias tomcat -keyalg RSA

and save entered password : password1


Step 2: Now we will configure tomcat for using keystore file and -SSL config


-->now open server.xml file and replace following :

<Connector SSLEnabled="true" acceptCount="100" clientAuth="false"
    disableUploadTimeout="true" enableLookups="false" maxThreads="25"
    port="8443" keystoreFile="C:\Users\Selva\.keystore" 
    keystorePass="password"
    protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https"
    secure="true" sslProtocol="TLS" />

Step 3: Now we will configure our web app to run on https.


-->open web.xml of web application.

<security-constraint>
    <web-resource-collection>
        <web-resource-name>securedapp</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

Step 4: Test Run

Make sure the keystoreFile="/Users/.keystore" is specified correctly, see Tomcat Troubleshooting section:

By default, Tomcat expects the keystore file to be named .keystore in the user home directory under which Tomcat is running (which may or may not be the same as yours :-). If the keystore file is anywhere else, you will need to add a keystoreFile attribute to the <Connector> element in the Tomcat configuration file.

我遇到了同样的问题,通过删除 . 解决了,你不在 Linux 中:keystoreFile="C:\\Users\\Selva\\keystore"

"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM