AEM publish domain request being handled by dispatcher_vhost.conf | Community
Skip to main content
Rohan_Garg
Community Advisor
Community Advisor
August 29, 2022
Solved

AEM publish domain request being handled by dispatcher_vhost.conf

  • August 29, 2022
  • 1 reply
  • 788 views

Hi All,

 

Any request coming on my publish instance are being handled by the catch-all vhost defined in dispatcher_vhost.conf

 

# Create a catch-all vhost
# A catch-all is a safe place for un-matched hostnames to land.
# This prevents someone pointing an-unwanted DNS record at your site and loading your pages.
# Example: yoursitesucks.com (CNAME) -> yourelbaddressQKAWZM8H-208090978.us-east-1.elb.amazonaws.com
# This host will accept any hostname and with a rewrite rule load the same index page giving away no details as to what they are hitting
# That way bots and hackers won't know what purpose a random IP listening on webports is really doing.
# Hitting the catch all doesn't let them know the customer is ExampleCo.com etc..
<VirtualHost *:80>
ServerName unmatched-host-catch-all
ServerAlias "*"
# Azure traffic manager will hit here so lets have a custom log for that
SetEnvIf User-agent .*Azure\sTraffic\sManager.* trafficmanager
CustomLog logs/healthcheck_access_log combined env=trafficmanager
CustomLog logs/httpd_access.log combined env=!trafficmanager

# Specify where the catch all html files live
DocumentRoot /var/www/localhost/htdocs
# Add some visible targets AKA breadcrumbs that you can see in your browser dev tools or curl -I command
<Directory "/var/www/localhost/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule mod_headers.c>
Header always add X-Vhost catch-all
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/* /index.html [PT,L,NC]
</IfModule>
</VirtualHost>

 

All request on publish have X-Vhost catch-all appended to their headers.

 

Previously the request to publish URL - https://publish-pyyyyyy-ezzzzzz.adobeaemcloud.com/ were being handled correctly without checking which vhost was serving the request.

 

Can anyone please help why this is an issue ? As a result all request on my publish instance are served with - 

@arunpatidar , @mohit_kbansal , @joerghoh , @kautuk_sahni 

 

Thanks,

Rohan Garg

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 Rohan_Garg

Hi All,

 

The catch-all v-host file is picked if the default.vhost is not being picked up in dispatcher configuration.

For some reason, my default.vhost file in enabled vhosts was not being picked up correctly.

 

We created an exact replica of default.vhost (brandA_default.vhost) and created a symlink in enabled vhosts folder.

This worked and solved the issue as a workaround.

 

Why the default.vhost was not picked up in dispatcher configuration is still something I will check and update.

 

Thanks,

Rohan Garg

1 reply

Rohan_Garg
Community Advisor
Rohan_GargCommunity AdvisorAuthorAccepted solution
Community Advisor
August 31, 2022

Hi All,

 

The catch-all v-host file is picked if the default.vhost is not being picked up in dispatcher configuration.

For some reason, my default.vhost file in enabled vhosts was not being picked up correctly.

 

We created an exact replica of default.vhost (brandA_default.vhost) and created a symlink in enabled vhosts folder.

This worked and solved the issue as a workaround.

 

Why the default.vhost was not picked up in dispatcher configuration is still something I will check and update.

 

Thanks,

Rohan Garg