Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

dispatcher configuration for host name and port

hari_krishna_s1
Level 2
Level 2

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"
      }
1 Accepted Solution
kalyanar
Correct answer by
Employee
Employee

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. 

View solution in original post

8 Replies
Feike_Visser1
Employee
Employee

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
Level 2
Level 2

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

kalyanar
Employee
Employee

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

/hostname "127.0.0.1"
      /port "4502"
hari_krishna_s1
Level 2
Level 2

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?

awadheshv
Level 3
Level 3

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

kalyanar
Correct answer by
Employee
Employee

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. 

View solution in original post

cp_g
Level 1
Level 1

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 

hari_krishna_si
Level 1
Level 1

   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"
      
        }
      }