Apache HTTP + Alfresco 4.2 issue

cancel
Showing results for 
Search instead for 
Did you mean: 
tcuser
Customer

Apache HTTP + Alfresco 4.2 issue

Hi all,

I'm having some issues with Apache HTTP and Alfresco integration... hope sombody can help me.

I'm developing a java web application to search documents. All this documents are stored in an Alfresco Community installation and the app accesses Alfresco via CMIS. We don't want users to access alfresco, not even the main page, so I installed an Apache HTTP server to rewrite urls and make them a little bit friendly and avoid any reference to Alfresco.

In summary, this would be my environment:

  • Alfresco Community 4.2.f installed in an Apache Tomcat 7.0.52
  • Java Search Tool installed in an Apache Tomcat 7.0.52
  • Apache HTTP 2.4
  • Windows Server 2019

I configured Apache HTTP to rewrite urls as I said like this:

# Rewrite user URLs
RewriteRule (\w{8}-\w{4}-\w{4}-\w{4}-\w{12})/([A-Z]{2}_[A-Z]{1,3}_\d{1,3}_\d{4}-\d{5}_\d{5}.*)/(\w+)$ /alfresco/service/api/node/content/workspace/SpacesStore/$1/$2?alf_ticket=TICKET_$3
RewriteRule thumbnails/(\w{8}-\w{4}-\w{4}-\w{4}-\w{12})/(\w+)$ /alfresco/service/api/node/workspace/SpacesStore/$1/content/thumbnails/doclib?alf_ticket=TICKET_$2

It works like charm, but when I try to ban the access to Alfresco main page, or any other petition to any other url in Alfresco, it fails :/

I've tried (among other hundred things):

RewriteRule alfresco/(\w+/)+\w+\.jsp$ - [F]         NOOK
RewriteRule ^alfresco/(\w+/)+\w+\.jsp$ - [F]        NOOK
RewriteRule ^alfresco/(\w+/)+\w+\.jsp - [F]         NOOK
RewriteRule alfresco* - [F]                         NOOK

I've even tried the rule

RewriteRule \.* - [F]

This obviously forbids all traffic, including documents urls and the search tool stops working... BUT I still can access to /alfresco/faces/jsp/dashboards/container.jsp. How can this be possible?

What's more, if I set the rule 

RewriteRule alfresco/faces/jsp/dashboards/container.jsp – [F]

It's still accessible... :__(

I'm sure I'm missing something... maybe it has something to do with the redirections in Alfresco jsp's files? I don't know but I think I'm going crazy... so help needed, plis!!

Thank you very much in advance Smiley Happy)

3 Replies
tcuser
Customer

Re: Apache HTTP + Alfresco 4.2 issue

Bump! Anybody can help me here, please?

EddieMay
Alfresco Employee

Re: Apache HTTP + Alfresco 4.2 issue

Hi @tcuser,

Have you raised a support ticket?

Cheers, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
tcuser
Customer

Re: Apache HTTP + Alfresco 4.2 issue

Not yet... since it's not exactly a product related problem, I haven't. But I will, 'cause my problem is still there :/. Thank you!