You get an Access Denied because the page refered by $HOSTNAME$ (ex : www.mydomain.com
) can't be access directly.
If you need to go at a specific page ( ex : www.mydomain.com/login.asp
) you must use a different check.
You must be using the basic check_http :
command_line $USER1$/check_http -H $HOSTADDRESS$
Define a new one in your checkcommands.cfg :
command_line $USER1$/check_http -H "$HOSTADDRESS$/$ARG1$"
then in your services.cfg, replace the entry for the new check command :