Frontend pipeline deployment breaks the website
This article describes a solution to the issue where frontend pipelines are not successfully applied to websites, even when deployment finishes successfully. Add ServerAlias to an enabled vhost to fix it.
Description description
Environment
AEM as a Cloud Service
Issue/Symptoms
Frontend pipelines are not successfully applied to websites. Although the deployment finishes successfully, the JS/CSS
files are not applied to the website.
Steps to reproduce
- Create a new site using the
aem-site-template-standard version 2.2.0
. - Download sources from that site.
- Make some changes to the website theme.
- Push the sources into the repo/branch.
- Run the FE pipeline from that repo/branch.
After the FE pipeline is deployed, the new site breaks, and no JS/CSS
is loaded.
In addition, you will see that at:
"/conf/fe-pipeline-test/sling:configs/com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig/jcr:content"
, the property "prefixPath"
is set to:
"https://static-pxxxxx-eyyyyy.adobeaemcloud.com/5be94d5dbcc77e833330ed8d9d98f549f85aebfffd0ce933c04f9b1e6e67bdad"
, which looks good.
But whatever resource you try to load from this server (like the CSS: https://static-pxxxxx-eyyyyy.adobeaemcloud.com/5be94d5dbcc77e833330ed8d9d98f549f85aebfffd0ce933c04f9b1e6e67bdad/theme.css)
, you always get It works.
Resolution resolution
When styling loads from the static domain and only returns It works, you need to verify whether the static domain is blocked at the Dispatcher level.
For FE pipelines to work, the deployed frontend artifacts need to be served correctly by the CDN/Dispatcher.
If the Dispatcher configuration blocks the static domain, the CSS/JS
cannot be loaded.
For this, at least one of the enabled vhosts has either:
ServerAlias *
ORServerAlias "static-p<progId>-e<envId>.adobeaemcloud.com"
On checking the Dispatcher configuration, if you see that only the deault.vhost
has ServerAlias "*"
. However, the default.vhost
is not enabled.
Adding ServerAlias
to an enabled vhost fixes the issue.
Ask Questions In Our Experience League Campaign Community
If you have any questions you’d like answered about this topic, or read previous answered-questions, we invite you to view our Experience League Community blog post that includes this article, send us your questions and comments, and join our Experience League Campaign Community!