Wednesday, April 6, 2016

How to restrict crawling/indexing of specific URLs in Adobe Search and Promote(Adobe S&P)

How to restrict crawling/indexing of specific URLs in Adobe Search and Promote(Adobe S&P)

Some cases we may need to index specific type of URLs from the website and excluding all other URLs available.

The URL Masks can be used in Adobe S&P to achieve this.

URL mask will help us to define the rules to include or exclude the specific URLs during the indexing.

We will be able to define include and exclude rules

Include - pattern that specifies the URLs will be indexed
Exclude - pattern that specifies the URLs will be excluded from the indexing.

To index the URLs that is starting with mask.


The crawler will index all the URLs that starts with https://server.com/content/doc



Tuesday, April 5, 2016

How to Clear/Recompile the JSP classes in Adobe Experience Manager(AEM) 6.1

How to Clear/Recompile the JSP classes in Adobe Experience Manager(AEM) 6.1

Sometime when we are deploying the packages, the JSP classes will not get compiled automatically in Adobe Experience Manager(AEM) 6.

We can follow the below option to clear/recompile the JSP classes.

Login to - http://<AEM HOST>:<AEM PORT/system/console/slingjsp

Click on Recompile all JSPs



Saturday, February 13, 2016

Pending - Waiting for next available executor/Disk space too low on /tmp - Jenkins

Pending - Waiting for next available executor/Disk space too low on /tmp - Jenkins

While we were trying to execute the job, it was displaying "Pending - Waiting for next available executor". When looking into the Jenkins node from the console, the Master node is offline and the error message displayed was "Disk space too low. Only xxxGB on /tmp" but the /tmp folder has space around 1GB.





Steps are followed to resolve the issue

  • Increase the space available in /tmp folder. If not able to increase the space in /tmp folder then TemporarySpaceMonitor can be disabled or the memory threshold value of the TemporarySpaceMonitor can be reduced in $JENKINS_HOME/nodeMonitors.xml(make sure atleast minimum memory is available)



Wednesday, February 10, 2016

Restricitng the content access to authenticated user - Adobe CQ5/AEM

Restricting the content access to authenticated user - Adobe CQ5/AEM

By default anonymous user in Adobe Experience Manager(AEM) will have the read access to content, so the content can be accessed via dispatcher/publisher directly without providing any credential.

This blog will explain how to restrict the content access to only authenticated users via dispatcher(including cached content) and publisher.

Remove the access of Anonymous user for content node in publisher


Create a user sample1 in publisher and provide the read access for content node (Multiple users can be created based on the requirement)



Monday, February 8, 2016

Enabling basic authentication for different directories with different credentials in dispatcher - Adobe CQ5/AEM

Enabling basic authentication for different directories with different credentials in dispatcher - Adobe CQ5/AEM

Separate credential for two different directories:

Create the .httpaccess for different directories

htpasswd -c /etc/httpd/conf/dispatcher.htaccess <username>
htpasswd -c /etc/httpd/conf/dispatcher1.htaccess <username>

Add the below configuration in the httpd.conf

<LocationMatch ^/content/sample1*>
# unsets authorization header when sending request to AEM
RequestHeader unset Authorization
SetEnvIf Request_URI ^/content/sample1* auths=0
AuthName "Please login to access the site"
AuthType Basic
AuthUserFile /etc/httpd/conf/dispatcher.htaccess
# first, allow everybody
Order Allow,Deny
Satisfy any
Allow from all
Require valid-user
# then, deny only if required
Deny from env=auths
</LocationMatch>

<LocationMatch ^/content/sample2*>
# unsets authorization header when sending request to AEM
RequestHeader unset Authorization
SetEnvIf Request_URI ^/content/sample2* auths=1
AuthName "Please login to access the press release"
AuthType Basic
AuthUserFile /etc/httpd/conf/dispatcher1.htaccess
# first, allow everybody
Order Allow,Deny
Satisfy any
Allow from all
Require valid-user
# then, deny only if required
Deny from env=auths
</LocationMatch>

Restart the dispatcher

Now you will be able to access /content/sample1 and /content/sample2 with different credential

There is a another scenario, separate credential for particular directory and rest of all the directories will use the same credentials.

Create the .httpaccess for different directories

htpasswd -c /etc/httpd/conf/dispatcher.htaccess <username>
htpasswd -c /etc/httpd/conf/dispatcher1.htaccess <username>

<Location />
# unsets authorization header when sending request to AEM
RequestHeader unset Authorization
SetEnvIf Request_URI ^/content/* auths=1
SetEnvIf Request_URI ^/content/sample2* auths=0
AuthName "Please login to access the site"
AuthType Basic
AuthUserFile /etc/httpd/conf/dispatcher.htaccess
# first, allow everybody
Order Allow,Deny
Satisfy any
Allow from all
Require valid-user
# then, deny only if required
Deny from env=auths
</Location>

<LocationMatch ^/content/sample2*>
# unsets authorization header when sending request to AEM
RequestHeader unset Authorization
SetEnvIf Request_URI ^/content/sample2* auths=1
AuthName "Please login to access the press release"
AuthType Basic
AuthUserFile /etc/httpd/conf/dispatcher1.htaccess
# first, allow everybody
Order Allow,Deny
Satisfy any
Allow from all
Require valid-user
# then, deny only if required
Deny from env=auths
</LocationMatch>

Restart the server.