AllowOverride not allowed here

rkmax

I have setup a virtualhost like following

<VirtualHost *:80>
  DocumentRoot /var/www/html
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  Options Includes
  AllowOverride All
</VirtualHost>

But always throws me

AH00526: Syntax error on line 6 of /etc/apache2/sites-enabled/000-my-site.conf:
AllowOverride not allowed here

I'm a bit confused because I understand that is the right place to do it

Panama Jack

It's because you have to put it in <Directory> directive.' .htaccess is per directory context, so you have to explicitly tell apache where .htaccess is allowed to be used.

<VirtualHost *:80>
  DocumentRoot /var/www/html
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  Options Includes
  <Directory "/var/www/html">
  AllowOverride All
  </Directory>
</VirtualHost>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

"AllowOverride not allowed here" in WAMP

From Dev

"AllowOverride not allowed here" in WAMP

From Dev

500 Error on apache server - "AllowOverride not allowed here"

From Dev

500 Error on apache server - "AllowOverride not allowed here"

From Dev

"set" directive is not allowed here

From Dev

.htaccess: LogLevel not allowed here

From Dev

variable declaration not allowed here

From Dev

Array initializer is not allowed here

From Dev

Column not allowed here error

From Dev

variable declaration not allowed here

From Dev

Error: 'void' type not allowed here

From Dev

nginx "env" directive is not allowed here

From Dev

Apache error "AliasMatch not allowed here"

From Dev

cdef statement not allowed here for structure

From Dev

Why is variable declaration not allowed here?

From Dev

Android manifest attribute not allowed here

From Dev

NGINX - "server" directive is not allowed here

From Dev

Error: Parse Objects not allowed here

From Dev

Why is lambda function not allowed here?

From Dev

About "group function is not allowed here"

From Dev

Apache error "AliasMatch not allowed here"

From Dev

column not allowed here oracle with getText

From Dev

Error: 'void' type not allowed here

From Dev

@FindBy Annotations not allowed here for CSS

From Dev

Android Lint Shape not allowed here

From Dev

Why append a vector to another vector is not allowed here?

From Java

nginx: [emerg] "server" directive is not allowed here

From Dev

Is a function definition not allowed here before a '{' token?

From Dev

Oracle Column Not Allowed Here Default Value