Host static site in dispatcher | Community
Skip to main content
msina
Level 3
April 23, 2019

Host static site in dispatcher

  • April 23, 2019
  • 2 replies
  • 9420 views

Hi ,

Recently we got requirement to host a site in our AEM environment.The site will be always static with few image ,css and js .

We got the html file along with the other required contents (images, css, js fonts etc).

We are planning to create a directory inside "/opt/communique/dispatcher/cache/content" called "newsite"

/opt/communique/dispatcher/cache/content/newsite ,so that it serves from the dispatcher cache always.

Any idea how can we achieve this.When i hit the newsite.html it does not load the images .

Also is there any other easy way to host this static site in AEM dispatcher.

regards

Sina

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

2 replies

Gaurav-Behl
Level 10
April 23, 2019

Have you already built a site in AEM or outside AEM?

Where is it hosted - in AEM or outside AEM?

Does AEM dispatcher talk to AEM publish server for fetching the content and is it configured per Adobe's recommended guidelines?

msina
msinaAuthor
Level 3
April 23, 2019

We have already build our primary sites e.g abc.com , xyz.ca  in AEM which is as per Adobe's recommended guideline.

Now we have a new requirement to host one static site "qwe.com" in AEM. And for this we really don't want to put anything in author and publisher side.Just want to put the static files(html,css,js,and fonts) in dispatcher layer.Is this possible?

Or please suggest any other suitable workaround.

Adobe Employee
April 23, 2019

Hello,

If you want to serve content statically then you will have to configure something like this for site configurations on paths that you don't want to be served by the dispatcher-handler:

<Location />

<IfModule disp_apache2.c>

SetHandler dispatcher-handler

</IfModule>

</Location>

<Location /favicon.ico>

SetHandler default-handler

</Location>

Regards,

Vishu

Adobe Employee
April 24, 2019

Another solution for this would be to have multiple virtual hosts within Apache. Each virtual host would have its own separate document root. Avoid nested the sites within each other folder structure. The static site will reside in one location and the site serving content from AEM will be in a separate location. Just make sure the Dispatcher configuration manage content in one location.

msina
msinaAuthor
Level 3
April 24, 2019

Thanks all for your feedback.