I have burned myself trying to set up a secure WebSocket service using my remote Tomcat10 server but without any success. I keep on getting from Postman "Unexpected server response: 404" after hitting "wss://mydomain.org:4123/ws". I attach the most important settings in case someone could hopefully spot what I am doing wrong.
I would like to mention that I am deploying with Maven the project from 127.0.0.1 via a Tunnel.
server.xml
...
<Service name="Catalina">
<Connector executor="tomcatThreadPool"
           port="5123"
           compression="off"
           protocol="HTTP/1.1"
           connectionTimeout="20000"
           />
<Connector port="4123"
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           maxThreads="100"
           compression="off"
           connectionTimeout="20000"
           SSLEnabled="true"
           scheme="https"
           secure="true">
  <SSLHostConfig >
    <Certificate  certificateFile="path/to/certificateFile"
                  certificateKeyFile="path/to/certificateKeyFile"
                  certificateChainFile="path/to/certificateChainFile" />
  </SSLHostConfig>
</Connector>
<Engine name="Catalina" defaultHost="localhost">
...
  <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
...
  </Host>
</Engine>
pom.xml
...
<dependencies>
    <dependency>
        <groupId>com.lambdaworks</groupId>
        <artifactId>scrypt</artifactId>
        <version>1.4.0</version>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>42.3.1</version>
    </dependency>
    <dependency>
        <groupId>javax.websocket</groupId>
        <artifactId>javax.websocket-api</artifactId>
        <version>1.1</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
<build>
    <finalName>My_WebService</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <url>http://127.0.0.1:5123/manager/text</url>
                <path>/</path>
                <server>My-Server</server>
                <finalName>My_WebService</finalName>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>3.3.2</version>
        </plugin>
    </plugins>
</build>
web.xml
...
<display-name>WS Engine</display-name>
<description>Desc.</description>
<resource-ref>
    <description>My Database</description>
    <res-ref-name>jdbc/my-database</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>
<context-param>
    <param-name>org.apache.tomcat.websocket.binaryBufferSize</param-name>
    <param-value>65536</param-value>
</context-param>
MainWsClass
@ServerEndpoint("/ws")
public class MainWsClass {..}