sfw/fix
Options not allowed here medium

.htaccess: Option FollowSymLinks not allowed here (500 Internal Server Error)

An Options directive in .htaccess is rejected because the directory's AllowOverride forbids it.

What you see

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

[error log]
AH00526: Syntax error on line 1 of /var/www/html/.htaccess:
Option FollowSymLinks not allowed here

What’s actually happening

The page returns a bare 500 and the browser shows nothing useful. The real message is in the Apache error log: AH00526 plus 'Option FollowSymLinks not allowed here', naming the .htaccess file and line. It usually appears right after deploying an app whose .htaccess sets Options +FollowSymLinks or Options -Indexes — code that worked on the old host and now 500s here. The directive itself is valid; Apache just won't let .htaccess use it under the current override policy.

Common causes

  • The matching <Directory> block has AllowOverride that excludes Options (e.g. AllowOverride FileInfo, or AllowOverride None with .htaccess otherwise ignored).
  • Apache 2.4 tightened defaults — AllowOverride is None out of the box, so any Options line in .htaccess errors.
  • The app's bundled .htaccess assumes the permissive policy of its previous host.
  • AllowOverride is set on the wrong directory and doesn't cover the path the .htaccess actually lives in.
  • An override at AllowOverride Options=Indexes,FollowSymLinks is too narrow for the specific option requested.

How to fix it

  1. Read the log to get the exact file and linesudo tail -n 30 /var/log/apache2/error.log (or /var/log/httpd/error_log). The AH00526 entry points at the precise .htaccess and the offending directive — don't guess from the generic 500.
  2. Allow Options overrides in the vhostIn the <Directory /var/www/html> block, set AllowOverride Options=FollowSymLinks,Indexes FileInfo (or AllowOverride All if the policy permits). This authorizes .htaccess to use those specific Options. Then sudo systemctl reload apache2.
  3. Or remove the Options line from .htaccessIf you control the vhost, set Options +FollowSymLinks directly in the <Directory> block and delete the line from .htaccess. Directives in the vhost don't need an AllowOverride grant and are read once at startup instead of per-request.
  4. Confirm you edited the right Directory blocksudo apachectl -S shows which vhost and DocumentRoot serve the request. Make sure the AllowOverride change is on the <Directory> that actually contains the .htaccess, not a sibling path.
  5. Validate and reloadsudo apachectl configtest returns Syntax OK, then reload. Reload the page — a 200 with no AH00526 in the log confirms the fix.

Stop it recurring

Set Options in the vhost <Directory> block instead of .htaccess, and only widen AllowOverride to what the app genuinely needs.

Related errors