Expand my Community achievements bar.

Not Found The requested URL / was not found on this server.

Avatar

Level 2

Hi ,

I am getting "Not Found The requested URL / was not found on this server" when trying to access AEM pages with https protocol but its working fine when I am using http.We am not using loadbalancer, it is directly accessing from webserver.

Configuration as we below:

https.conf

.
.Listen 80

Listen 443

.

.

Include httpd-vhost.conf

.

.

<VirtualHost *:443>

   SSLEngine on

   SSLCertificateFile /applic/apache/httpd/certs/aem-site.crt

   SSLCertificateKeyFile /applic/apache/httpd/certs/aem-site.key

   SetHandler dispatcher-handler

</VirtualHost>

httpd-vshost.conf

<VirtualHost *:80>

     ServerName sitename.com.au

     ServerAlias www.sitename.com.au

     DocumentRoot "/applic/apache/httpd/cache"

     .

     .

     .

     <IfModule mod_rewrite.c>

                RewriteEngine on

                RewriteCond %{HTTP:X-Forwarded-Proto} !https

                RewriteCond %{REQUEST_URI} !^/eagle/check\.sh$

                RewriteCond %{REQUEST_URI} !^/dispatcher/invalidate\.cache$

                RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

               

        </IfModule>

     .

     .

     .

     .

</VirtualHost>

Any idea why its throwing "Not Found" error ?

4 Replies

Avatar

Level 2

Hi Kautuk,

As I mentioned above my things are working fine in http protocol but not in "https". I have checked in dispatcher.any file I dont have any line which is denying the POST request.

My Observation:

1. The request is coming as https/443 port in webserver which is trying to send request with the same port in publish instance which is blocked.

2. Currently I have VirtualHost config for only 80 port.

Do I need to create same virtualHost for 443 and do the reverse proxy from 80 port ? If yes do you have any sample file ?

Avatar

Administrator

Jörg Hoh​ your help needed!!

~kautuk



Kautuk Sahni

Avatar

Employee Advisor

Hi

is the $SERVER_NAME in the rewrite rule the address of your webserver/dispatcher or of your AEM publish instance?

When you use the dispatcher you don't need to rewrite the request to the publish URL, the dispatcher is taking care of that.

Jörg