Hi Expert,

when i m accessing a .shtml file from my apache server, I got this Error."You don't have permission to access /test/link.shtml on this server.: 403 Forbidden" on windows O.S

Pls tell me the Procedure to solve this Error..

Thnx in Advance

Dani AI

Generated

asked if the file exists and confirmed it does. A 403 for a single .shtml file on Windows usually means either Apache is configured to deny access, the SSI handler/module is not set up, or the Windows ACLs for the file/folder prevent the Apache service account from reading it. Next steps to diagnose and fix:

  • Quick checks: try a plain test.html in the same folder. If test.html is also 403, focus on directory/ACL or Apache Directory directives. If test.html works but link.shtml does not, the problem is likely SSI configuration or a ruleset blocking .shtml.
  • Inspect Apache logs (error_log) for lines like "client denied by server configuration" or other permission messages — the log will point to whether the denial is from Apache config or the OS.
  • Ensure mod_include is enabled and the directory allows Includes. Example config options (adjust paths and syntax for your Apache version):
# Apache 2.4
LoadModule include_module modules/mod_include.so

<Directory "C:/path/to/htdocs/test">
  Options +Includes
  Require all granted
</Directory>

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
# Apache 2.2
<Directory "C:/path/to/htdocs/test">
  Options +Includes
  Order allow,deny
  Allow from all
</Directory>

AddType text/html .shtml
AddHandler server-parsed .shtml
  • Windows file ACLs: confirm the account running Apache (LocalSystem, NetworkService, or a specified user) has Read & Execute on the file and each parent folder (Properties -> Security).
  • Check for .htaccess or <FilesMatch> rules that may deny .shtml, and for other security modules (mod_security) that could block SSI requests.
  • Restart Apache after changes and re-check the error_log if the 403 persists.

For SSI specifics and module details see the Apache documentation: Apache SSI howto and mod_include. Note: enable IncludesNOEXEC if you do not need exec capabilities to reduce risk.

Recommended Answers

All 2 Replies

Is there a file present called link.stml??

yes, I have created a Directory called test and inside that directory i have created a simple file called link.shtml......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.