Dispatcher and Apache Alias Configuration Problem. | Community
Skip to main content
October 16, 2015
Solved

Dispatcher and Apache Alias Configuration Problem.

  • October 16, 2015
  • 3 replies
  • 2593 views

Hi,

I'm having a problem when trying to install the dispatcher extension.

We have both a CQ publish instance, and at the same time one PHP based application which adds extra functionality to the site.

Before installing the dispatcher, we had the following configuration on the httpd.conf file for serving both simultaneously:

<VirtualHost *:80>

    ServerName SERVER_NAME
    
    ProxyPreserveHost On
    
    ProxyPass /SERVER_ALIAS !
    Alias /SERVER_ALIAS "ALIAS_PATH"
    <Directory "ALIAS_PATH">
        AllowOverride All
        Allow from All
    </Directory>

    ProxyPass / http://localhost:4503/
    ProxyPassReverse / http://localhost:4503/
    
    RewriteEngine On
   
</VirtualHost>

 

After installing the dispatcher we removed the proxypass configurations, and added a farm on the dispatcher.any for the 4503 port.

The files remained as following:

(httpd.conf).

<VirtualHost *:80>

    ServerName SERVER_NAME
    
    Alias /SERVER_ALIAS "ALIAS_PATH"
    <Directory "ALIAS_PATH">
        AllowOverride All
        Allow from All
    </Directory>

</VirtualHost>

(dispatcher.any)

/farms
  /cq
    {  
    /clientheaders
      {
      "*"
      }
      
    /virtualhosts
      {
      "ninos.televisa.dev"
      }
      
    # The load will be balanced among these render instances
    /renders
      {
      /rend01
        {
        /hostname "127.0.0.1"
        /port "4503"
        }
      }
 
      
    /filter
      {
      /0001 { /type "deny" /glob "*" }
      
      /0023 { /type "allow" /url "/content*" }  # disable this rule to allow mapped content only

...

If I remove the farm for the 4503, I am able to reach the contents served for the external applicacion but not for CQ. When I add the farm, I can see the CQ application but suddenly all the requests to the alias match return a 403 forbidden.

I've trying adding an extra farm for port 80, filtering the contents within the alias so the dispatcher rejects the request but apache handle it itself, but nothing is working.

Can you please point me in the right direction for this?

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Scott_Brodersen

leonardo.gorbliuk wrote...

Its ok, looks like I was able to make it work.

I had to add a second farm for the custom application in port 80, but add it in the first position of the dispatcher (I missed an important line in the documentation, and I'll leave it here in case someone has the same problem): If you use more than one render farm, the list is evaluated bottom-up

Thanks!

 

thanks for that feedback. I highlighted that information in a note so that it is more prominent. http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Defining%20Farms%20-%20/farms

scott

3 replies

Sham_HC
Level 10
October 16, 2015

It is expected as per your configuration.  Have aem configured with context root then have SetHandler dispatcher-handler configured to that path rather than route.

October 16, 2015

Its ok, looks like I was able to make it work.

I had to add a second farm for the custom application in port 80, but add it in the first position of the dispatcher (I missed an important line in the documentation, and I'll leave it here in case someone has the same problem): If you use more than one render farm, the list is evaluated bottom-up

Thanks!

Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
October 16, 2015

leonardo.gorbliuk wrote...

Its ok, looks like I was able to make it work.

I had to add a second farm for the custom application in port 80, but add it in the first position of the dispatcher (I missed an important line in the documentation, and I'll leave it here in case someone has the same problem): If you use more than one render farm, the list is evaluated bottom-up

Thanks!

 

thanks for that feedback. I highlighted that information in a note so that it is more prominent. http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Defining%20Farms%20-%20/farms

scott