Expand my Community achievements bar.

AEM 6.4

Avatar

Level 2

Hi,

I have set up AEM 6.4 on a dev Linux instance (Author, publisher and dispatcher on the same instance). Set up dispatcher as per the standards with dispatcher flush configured. When I access the content path from publisher (serverhostname:4503/content/abc/xyz.html) it works and the samewith dispatcher is not working (serverhostname/content_path/abc/xyz.html) where as (serverIPaddress/content_path/abc/xyz.html) is working fine!!

If this is the problem with host name configurations of the server the publisher page with host name should not work. Can any one know what the issue is? Please help me.

4 Replies

Avatar

Employee Advisor

I believe this is due to dispatcher filter rejects.

Tail your dispatcher.log and watch for issues such a "Filter rejects" log messages.

$ tail -f /private/var/log/apache2/dispatcher.log | grep rejects

Default dispatcher configuration is Deny everything and you have to manually add filters to allow your site path.

/filter

  {

  # Deny everything first and then allow specific entries

  /0001 { /type "deny" /glob "*" }

# /0012 { /type "allow" /url "/content/abc/xyz*" } # allow content

Check [1] for more details.

[1] https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/dispatcher-co...

Avatar

Level 2

Hi Thanks for your response. I get

"Not Found

The requested URL /content/client_name/flex/rps/FLEXBSLRWD/en_us/home/travel.html was not found on this server."

in my browser while accessing through dispatcher host name + content path. The page exists and published in publisher.

I have allowed -  /0023 { /type "allow" /url "/content/*} in my filter.any file.

Only the access_log says below message (No other logs updates when I hit the URL)

==> access_log <==

10.216.57.119 - - [20/May/2019:08:05:36 +0000] "GET /content/client_name/flex/rps/FLEXBSLRWD/en_us/home/travel.html HTTP/1.1" 404 262

I have only one properly configured virtual hosts at this point with below configuration

<VirtualHost *:80>

    ServerName $Server_hostname

    ServerAlias $Server_IP

    DocumentRoot /var/www/html/client

<Directory /var/www/html/client>

        Options -Indexes -Includes

        <IfModule disp_apache2.c>

            SetHandler dispatcher-handler

            ModMimeUsePathInfo On

        </IfModule>

        AllowOverride None

        Require all granted

    </Directory>

    ErrorLog logs/client_error.log

    LogLevel warn

    TransferLog logs/client_access.log

RewriteCond %{REQUEST_URI} ^/$

    RewriteRule (.*) /content/client_name/flex/cps/USBCRPFLEX/en_us/home.html [PT,L]

</VirtualHost>

Any suggestions please?

Avatar

Employee Advisor

do you get that message from the httpd or from AEM?

And is the $Server_hostname really identical to the one you used in the request? You can increase the loglevel of the dispatcher to DEBUG to see if the dispatcher is consulted for this request or if the problem is the httpd itself. And in that case the dispatcher also logs enough information to see what AEM is doing; just add

DispatcherLogLevel 3

into the <ifModule disp_apache2.c> section and restart the httpd.

Avatar

Employee Advisor

Can you tell what you mean by "does not work"? What HTTP statuscode do you get? Is there any log message in the dispatcher and/or httpd log?

Can you check that you have configured your httpd to respond to requests which use the hostname to access the system? Typically there should be a matching virtual host configuration for this.

Jörg