Hello Everyone,
Now, I have configured dispatcher in aem in order to work cache in dispatcher.
But when I go to http://localhost-aem-dispatcher, Internal Server Error happens and the folder(C:\Apache2\htdocs\localhost-aem-dispatcher) for caching is empty like that.
Can you help me fix the error? I have no idea why.
1.C:\Windows\System32\drivers\etc\hosts
127.0.0.1 localhost-aem-dispatcher
2.C:\Apache2\conf\dispatcher.any
# name of the dispatcher
/name "internet-server"
# Each farm configures a set of load balanced renders (i.e. remote servers)
/farms {
# first farm entry (label is not important, just for your convenience)
/website {
/virtualhosts {
"localhost-aem-dispatcher"
}
/renders {
/0001 {
/hostname "127.0.0.1"
/port "4503"
}
}
/cache {
/docroot "C:/Apache2/htdocs/localhost-aem-dispatcher"
/enableTTL "1"
}
}
}
3.C:\Apache2\conf\extra\httpd-vhosts.conf
<VirtualHost localhost-aem-dispatcher:80>
ServerName localhost-aem-dispatcher
ServerAlias localhost-aem-dispatcher
DocumentRoot "C:/Apache2/htdocs/localhost-aem-dispatcher"
ErrorLog "logs/localhost-aem-dispatcher-error.log"
CustomLog "logs/localhost-aem-dispatcher-access_log" common
<Directory "C:/Apache2/htdocs/localhost-aem-dispatcher">
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
4.C:\Apache2\conf\httpd.conf
…
ServerRoot "c:/Apache2"
…
Listen 80
…
LoadModule dispatcher_module modules/disp_apache2.2.dll
…
<IfModule disp_apache2.c>
# location of the configuration file. eg: 'conf/dispatcher.any'
DispatcherConfig conf/dispatcher.any
# location of the dispatcher log file. eg: 'logs/dispatcher.log'
DispatcherLog logs/dispatcher.log
# log level for the dispatcher log, can be either specified
# as a string or an integer (in parentheses)
# error(0): Errors
# warn(1): Warnings
# info(2): Infos
# debug(3): Debug
# trace(4): Trace
DispatcherLogLevel debug
# if turned on, the dispatcher looks like a normal module
DispatcherNoServerHeader Off
# if turned on, request to / are not handled by the dispatcher
# use the mod_alias then for the correct mapping
DispatcherDeclineRoot Off
# if turned on, the dispatcher uses the URL already processed
# by handlers preceeding the dispatcher (i.e. mod_rewrite)
# instead of the original one passed to the web server.
DispatcherUseProcessedURL Off
# if turned to 1, the dispatcher does not spool an error
# response to the client (where the status code is greater
# or equal than 400), but passes the status code to
# Apache, which e.g. allows an ErrorDocument directive
# to process such a status code.
#
# Additionally, one can specify the status code ranges that should
# be left to web server to handle, e.g.
#
# DispatcherPassError 400-404,501
DispatcherPassError 0
#
# DispatcherKeepAliveTimeout specifies the number of seconds a
# connection to a backend should be kept alive. If not set or
# set to zero, connections are not kept alive.
#
#DispatcherKeepAliveTimeout 60
</IfModule>
…
DocumentRoot "c:/Apache2/htdocs"
…
<Directory />
<IfModule disp_apache2.c>
ModMimeUsePathInfo On
# enable dispatcher for ALL request. if this is too restrictive,
# move it to another location
SetHandler dispatcher-handler
</IfModule>
Options FollowSymLinks
AllowOverride None
</Directory>
…
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Views
Replies
Total Likes
I fixed Internal Server Error.
I changed my VirtualHost setting like that.
C:\Apache2\conf\extra\httpd-vhosts.conf
NameVirtualHost localhost-aem-dispatcher:80
<VirtualHost localhost-aem-dispatcher:80>
ServerName localhost-aem-dispatcher
ServerAlias localhost-aem-dispatcher
DocumentRoot C:/Apache2/htdocs/localhost-aem-dispatcher
ErrorLog C:/Apache2/logs/localhost-aem-dispatcher-error.log
CustomLog C:/Apache2/logs/localhost-aem-dispatcher-access_log common
<Directory C:/Apache2/htdocs/localhost-aem-dispatcher/>
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options FollowSymLinks
AllowOverride None
# Apache httpd 2.2
Order allow,deny
Allow from all
# Apache httpd 2.4
# Require all granted
</Directory>
</VirtualHost>
But I have still the problem that caching in dispatcher doesn't work.
Can you help me work the caching in dispatccher?
Views
Replies
Total Likes
You must have that property then only the server will accept requests
Require all granted
Do you want any requirement to not accept requests from the particular IP address or domain name ? if so then you can use below configurations
Require not ip 192.169.205.195
Require not host keysandstrokes.info
If want to disable requests from all users then you can use this
Require all denied
Views
Replies
Total Likes
I think Require all granted supports in Apache 2.4 version only.
I think Require all granted don't support in Apache 2.2 version.
My Apache version is 2.2.
Views
Replies
Total Likes
You need to use below one
Allow from all
Views
Replies
Total Likes
I already used below one..
Allow from all
but caching in dispatcher doesn't work.
what should I add in /cache in dispatcher.any ?
Views
Replies
Total Likes
I found the following informations below url.
"You cannot add the Require all granted
line in Apache 2.2, or you’ll get a 500 Internal Server Error."
Updating Virtual Host Settings from Apache 2.2 to Apache 2.4
Views
Replies
Total Likes
I request you please don't delete or modify the posts, it confuses people and it will people will loose the track
Views
Replies
Total Likes
Views
Likes
Replies