I am running dispatcher using docker on my local. I am trying to serve weekend.com from port 4503. localhost:80 is already serving it, but when I tried to run it using weekend.com I am having issues. What I have done so far is as follows :
I have mapped my local IP to weekend.com and local.weekend.com
I have created a farm file named weekend.farm inside enabled farm. This farm references the weekend.vhost from conf.dispatcher.d/virtualhosts. It's content is "local.weekedn.com" "weekend.com".
Inside Conf.d I have create weekend.vhost inside available_vhosts. And the content looks like this :
# Include customer defined variables
Include conf.d/variables/custom.vars
<VirtualHost *:80>
ServerName "weekend.com"
# Put names of which domains are used for your published site/content here
ServerAlias "*.weekend.com"
# Use a document root that matches the one in conf.dispatcher.d/default.farm
DocumentRoot "${DOCROOT}"
# URI dereferencing algorithm is applied at Sling's level, do not decode parameters here
AllowEncodedSlashes NoDecode
# Add header breadcrumbs for help in troubleshooting
<IfModule mod_headers.c>
Header add X-Vhost "weekend-vhost"
</IfModule>
<Directory />
<IfModule disp_apache2.c>
# Some items cache with the wrong mime type
# Use this option to use the name to auto-detect mime types when cached improperly
ModMimeUsePathInfo On
# Use this option to avoid cache poisioning
# Sling will return /content/image.jpg as well as /content/image.jpg/ but apache can't search /content/image.jpg/ as a file
# Apache will treat that like a directory. This assures the last slash is never stored in cache
DirectorySlash Off
# Enable the dispatcher file handler for apache to fetch files from AEM
SetHandler dispatcher-handler
</IfModule>
Options FollowSymLinks
AllowOverride None
# Insert filter
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Prevent clickjacking
Header always append X-Frame-Options SAMEORIGIN
</Directory>
<Directory "${DOCROOT}">
AllowOverride None
Require all granted
</Directory>
<IfModule disp_apache2.c>
# Enabled to allow rewrites to take affect and not be ignored by the dispatcher module
DispatcherUseProcessedURL On
# Default setting to allow all errors to come from the aem instance
DispatcherPassError 0
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
Include conf.d/rewrites/rewrite.rules
# Rewrite index page internally, pass through (PT)
RewriteRule "^(/?)$" "/index.html" [PT]
</IfModule>
</VirtualHost>
And this vhost file is included in enabled_vhosts/weekend.vhost
I am getting these errors when running the validator to generate out folder :
Cloud manager validator 2.0.62
2024/03/18 16:18:58 Dispatcher configuration validation failed:
2024/03/18 16:18:58 conf.dispatcher.d\available_farms\weekend.farm:9: file included at unknown location: /etc/httpd/conf.dispatcher.d/virtualhosts/weekend-virtualhosts.any
2024/03/18 16:18:58 skipping symlinks resolution checks for global folder due to windows platform
2024/03/18 16:18:58 please use a Linux/OS X environment to run locally or check results with a Cloud Manager pipeline
Attaching my dispatcher src folder for references.