Namastey,
Dhanywaad
Setting up dispatcher is one of the most common thing we do in AEM projects. Sometimes developers face issues in configuring it on Mac OS X.
You can follow below steps and get basic dispatcher setup done.
Step 1: Install Apache Server on your machine.Verify the version by running.
sudo httpd -version
Step 2: Download Dispatcher Module and sample files as per OS and apache version
Step 3: Extract the downloaded dispatcher module file and copy file "dispatcher-apache<x.y>-<rel-nr>.so" to directory /usr/libexec/apache2/
You can rename the copied file to mod_dispatcher.so
Step 4: Open httpd.conf from /private/etc/apache2/
Step 5: Add following configurations after last load module. ( it should be around line 170 in default in httpd.conf).
LoadModule dispatcher_module libexec/apache2/mod_dispatcher.so
<IfModule disp_apache2.c>
DispatcherConfig /etc/apache2/conf/dispatcher.any
DispatcherLog /etc/apache2/logs/dispatcher.log
DispatcherLogLevel 3
DispatcherDeclineRoot 0
DispatcherUseProcessedURL 0
DispatcherPassError 0
DispatcherKeepAliveTimeout 60
</IfModule>
<Directory />
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options FollowSymLinks
AllowOverride None
</Directory>
Step 6: Copy dispatcher.any from downloaded dispatcher module and paste it to /etc/apache2/conf/dispatcher.any
Step 7: Open dispatcher.any and find docroot in the configurations and change the location to match document root of httpd.conf
/docroot "/Library/WebServer/Documents"
Step 8: Run following command to verify configurations. You should get Synatax OK in response .
sudo apachectl start
sudo apachectl configtest
Step 9: Restart apache
sudo apachectl restart
Step 10: Start author instance on port 4502 and navigate to http://localhost:80 and it should redirect you to author instance.
You can find cached file at "/Library/WebServer/Documents"
For any issues you can tail apache and dispatcher log
/private/var/log/apache2/
/etc/apache2/logs/dispatcher.log
For any issues you can tail apache and dispatcher log
/private/var/log/apache2/
/etc/apache2/logs/dispatcher.log
Note: This is basic configuration for author instance using out of the box files available.For more details refer adobe doc [0][1]
Dhanywaad