AnsweredAssumed Answered

Try to use port 443 with ssl config

Question asked by marcùss on May 25, 2016
Latest reply on May 26, 2016 by marcùss
Hi everyone,

I had a project with Alfresco 5.1 with a server CentOS 7 and apache Httpd 2.4.6. I have to give a external access so before, in the compagny domains, i would like to configure the alfresco apps with https access. At this moment, i can access to my server in port 8080 (if i enable it in server.xml if i use the connection port 8080) but im not able to access to it with port 443. I have this following message : "Not Found  The requested URL /share was not found on this server."
In all my logs i had no more error message. I think there is a problem between apache and Tomcat.

This is my apache config :

# ——————
# Block API requests
# ——————

#LoadModule     rewrite_module      /etc/httpd/modules/
RewriteEngine  on
#RewriteBase    /
RewriteRule    ^/share/(.*)/proxy/alfresco/api/solr/(.*)$   -   [F]
RewriteRule    ^/share/-default-/proxy/alfresco/api/(.*)$   -   [F]

# ——-
# Proxy
# ——–

#LoadModule     jk_module /etc/httpd/modules/
JkWorkersFile  /etc/httpd/conf/
JkLogFile      /etc/httpd/logs/mod_jk.log
JkLogLevel     info
JkShmFile      /etc/httpd/logs/jk-runtime-status 

# ——-
# ——–

#LoadModule ssl_module /etc/httpd/modules/
#Deja dans /conf.d/ssl.conf
#Listen 443 https
#SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog

#allow granted to server path
<Location />
   Options All
   AllowOverride All
   Require all granted

#RedirectMatch ^/$ /share/

#Redirection http vers https
listen 80
listen 443

<VirtualHost *:80>
   Redirect permanent / https://<mydomain>.com:443

<VirtualHost *:443>
   redirectMatch ^/$ /share/
      #SSL enable
    SSLEngine           on
    SSLProtocol         all -SSLv2
    SSLCipherSuite      HIGH:!aNULL:!MD5
    SSLVerifyClient     none
   JkMount /* alfresco-worker   
    SSLCertificateKeyFile /etc/httpd/ssl/www.<mydomain>.com.key
    SSLCertificateFile /etc/httpd/ssl/<mydomain>.com.crt
    SSLCACertificateFile /etc/httpd/ssl/intermediate.crt
    ErrorLog            /etc/httpd/logs/ssl_error_log
    LogLevel            warn

   #JkLogFile      /etc/httpd/logs/mod_jk_httpd.log
   #JkLogLevel     warn
    JkMount /share alfresco-worker
    JkMount /share/* alfresco-worker
   JkMount /alfresco alfresco-worker
    JkMount /alfresco/* alfresco-worker
    #JkMount /alfresco/webdav alfresco-worker
    #JkMount /alfresco/webdav/* alfresco-worker
    #JkMount / alfresco-worker
    #JkMount /_vti_inf.html alfresco-worker
    #JkMount /_vti_bin/* alfresco-worker
    #JkMount /alfresco/aos alfresco-worker
    #JkMount /alfresco/aos/* alfresco-worker
    # Un-comment these lines for public API access
    # JkMount /alfresco/api/*/public/cmis/versions/* alfresco-worker
    # JkMount /alfresco/api/*/public/alfresco/versions/* alfresco-worker
    # JkMount /alfresco/service/api/server alfresco-worker    
    # JkMount /alfresco/cmisatom/* alfresco-worker    
    # JkMount  /alfresco/service/cmis/* alfresco-worker
    # JkMount /alfresco/api/cmis/versions/* alfresco-worker
    # Un-comment these lines for Desktop Sync
    # JkMount /alfresco/api/*/private/alfresco/versions/* alfresco-worker

This is my :


This is my server.xml about ajp and port 8443:

<Connector port="8009" URIEncoding="UTF-8" protocol="AJP/1.3" redirectPort="8443" address="localhost" enableLookups="false" />

    <Connector port="8443" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
               maxThreads="200" scheme="https" keystoreFile="/var/alfresco/data/alfresco5.1/keystore/ssl.keystore" keystorePass="kT9X6oe68t" keystoreType="JCEKS"
secure="true" connectionTimeout="240000" truststoreFile="/var/alfresco/data/alfresco5.1/keystore/ssl.truststore" truststorePass="kT9X6oe68t" truststoreType="JCEKS"
               clientAuth="want" sslProtocol="TLS" allowUnsafeLegacyRenegotiation="true" maxHttpHeaderSize="32768" maxSavePostSize="-1" /> 

If i use this code on server.xml :

<Connector executor="tomcatThreadPool"
               port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1"
               redirectPort="8443" maxHttpHeaderSize="32768" />

i can have access to my server with port 8080.

Any help is highly appreciated!

Many thanks