cancel
Showing results for 
Search instead for 
Did you mean: 

Try to use port 443 with ssl config

marcùss
Champ in-the-making
Champ in-the-making
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/mod_rewrite.so
RewriteEngine  on
#RewriteBase    /
RewriteRule    ^/share/(.*)/proxy/alfresco/api/solr/(.*)$   -   [F]
RewriteRule    ^/share/-default-/proxy/alfresco/api/(.*)$   -   [F]


# ——-
# Proxy
# ——–

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


# ——-
# SSL
# ——–

#LoadModule ssl_module /etc/httpd/modules/mod_ssl.so
#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
</Location>

#RedirectMatch ^/$ /share/

#Redirection http vers https
listen 80
listen 443

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


<VirtualHost *:443>
   redirectMatch ^/$ /share/
      #SSL enable
    SSLEngine           on
    SSLProtocol         all -SSLv2
    SSLCipherSuite      HIGH:!aNULL:!MD5
    SSLVerifyClient     none
   JkMount /* alfresco-worker   
   
      #Certificat
    SSLCertificateKeyFile /etc/httpd/ssl/www.<mydomain>.com.key
    SSLCertificateFile /etc/httpd/ssl/<mydomain>.com.crt
    SSLCACertificateFile /etc/httpd/ssl/intermediate.crt
      
      #Logs
    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
</VirtualHost>


This is my alfresco-workers.properties :

worker.list=alfresco-worker
worker.alfresco-worker.port=8009
worker.alfresco-worker.host=localhost
worker.alfresco-worker.type=ajp13
worker.alfresco-worker.lbfactor=1


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"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="32768" />

i can have access to my server with port 8080.

Any help is highly appreciated!

Many thanks
Marcus
2 REPLIES 2

morganp1
Confirmed Champ
Confirmed Champ
Hi Marcuss,

This is what I usually do to setup an application in SSL: http://blog.dbi-services.com/alfresco-protect-your-installation-with-apache-httpd/

I can see that you are trying to mix mod_jk and proxy setup so better just focus on one side I think. I used a RedHat 6.x OS in this blog but it will probably work without any change on CentOS too since RedHat and CentOS are pretty close.

Best regards,
Morgan

marcùss
Champ in-the-making
Champ in-the-making
Hi Morgan,

Thank you for your answer.
I resolved the issue. I add the ip address on each <VirtualHost> and in server.xml, i add my server ip address in the connector port 8009 because jk_mount was not able to connect to Tomcat with "localhost".

Now it's working only with this setup.
I will try your setup when i will have a project with RedHat.

Best regards,
Marcus