コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Virtual host config

Avatar

Level 2

Hi There,

 

We are trying to create virtualhost for our multiwebsite. We are following this link https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-d... We have created different virtualhost for both website. 

 

In vhost file what is DocumentRoot "${DOCROOT}" and value of this variable for different domain?

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

The simplified approach is(this is followed as part of the latest AMS/AEMasaCloud Dispatcher configurations)

  • Use a common docroot e.g. "/mnt/var/www/html" for all the Vhosts and farm files
  • Enable PT rules in rewrite file to send the request to AEM Publisher with complete URL - this helps to cache multiple website content into a common docroot without impacting each other. e.g 
    RewriteCond %{REQUEST_URI} !^/apps/(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/etc(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/libs(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/content(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/system(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/dam(.*) [NC]
    RewriteRule ^/(.*) /content/test/$1 [PT]

    Regards

    Albin

    https://www.albinsblog.com

元の投稿で解決策を見る

2 返信

Avatar

Community Advisor

HI @lavishvasuja ,

The /docroot property identifies the directory where cached files are stored.The value must be the exact same path as the document root of the web server so that Dispatcher and the web server handle the same files.The web server is responsible for delivering the correct status code when the dispatcher cache file is used, that’s why it is important that it can find it as well.

If you use multiple farms, each farm must use  a different document root.
Hope it helps!

Thanks
Tarun

Avatar

正解者
Community Advisor

The simplified approach is(this is followed as part of the latest AMS/AEMasaCloud Dispatcher configurations)

  • Use a common docroot e.g. "/mnt/var/www/html" for all the Vhosts and farm files
  • Enable PT rules in rewrite file to send the request to AEM Publisher with complete URL - this helps to cache multiple website content into a common docroot without impacting each other. e.g 
    RewriteCond %{REQUEST_URI} !^/apps/(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/etc(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/libs(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/content(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/system(.*) [NC]
    RewriteCond %{REQUEST_URI} !^/dam(.*) [NC]
    RewriteRule ^/(.*) /content/test/$1 [PT]

    Regards

    Albin

    https://www.albinsblog.com