dispatcher configuration for host name and port | Community
Skip to main content
hari_krishna_s1
New Participant
October 16, 2015
Solved

dispatcher configuration for host name and port

  • October 16, 2015
  • 8 replies
  • 3885 views

Hi,

I have installed AEM 6.0 in tomcat server. Just to curious on dispatcher configuration., when we install the "aemauthor.war" under tomcat (changed the tomcat server.xml with port 4502), AEM will be accessed as http://localhost:4502/aemauthor will bring the AEM login page.

When we configure the dispatcher, we need to specify host and port number as below. When AEM is deployed in tomcat what should be the host name? Can i assume it will be "localhost/aemauthor"? Apache will be adding port to localhost when it sends the request to AEM correct?

/myRenderer
      {
      /hostname "127.0.0.1"
      /port "4503"
      }
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 gopalKa

Any url will be server:port/contextpath/resourcepath.html. So the dispatcher will find the server:port from the any file. Please try and let me know. 

8 replies

New Participant
March 23, 2017

   Did you add the allow rule for content in dispatcher.any?

/<rule number here>{ /type "allow" /url "/publish/content/*"

 

I believe you set the renders with publish hostname and port. 

/virtualhosts
      {
      "hostname"
      }

    /renders
      {
      /rend01
        {
        /hostname "hostname"
        /port "port"
      
        }
      }

cp_g
New Participant
March 23, 2017

I have installed two instances with context path /author and /publish . also provided the renders as /hostname "localhost" /port 4503. but when I tried to hit domain I can see it is rendering from dispatcher but it is searching for /var/www/index.html rather going to publish. how can provide /publish context path so that the when I hit should go to publish server 

Feike_Visser1
Employee
October 16, 2015

Hostname etc is determined by Apache-config. The renderer section is only for the dispatcher to connect to AEM (author or publish)

hari_krishna_s1
New Participant
October 16, 2015

I agree..but in renders section need to provide cq domain and port. When we deploy the AEM in tomcat as i mentioned earlier AEM will be access with below link. How do we specify renders section for below URL? in renders section what should be the hostname?

http://localhost:4502/aemauthor - will show the AEM login screen

Employee
October 16, 2015

You are correct.  The below configuration would work. What issues are you facing?

/hostname "127.0.0.1"
      /port "4502"
hari_krishna_s1
New Participant
October 16, 2015

i did not try this. But curious to know how the dispatcher know the tomcat context path and connect AEM if we don't specify the tomcat context path?

New Participant
October 16, 2015

I dont think dispatcher allows application/contextpath specific config for renderer. in this case it simply connects to tomcat.

gopalKaAccepted solution
Employee
October 16, 2015

Any url will be server:port/contextpath/resourcepath.html. So the dispatcher will find the server:port from the any file. Please try and let me know.