S
S
Sergey2018-11-27 16:02:38
Apache HTTP Server
Sergey, 2018-11-27 16:02:38

What is the apache 2.4 config error?

Hello, the following config does not work on apache 2.4, how can I fix it?:

<VirtualHost *:80>
  ServerName IP или Домен
  DocumentRoot /var/www
  <Directory /var/www/>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Order allow,deny
  allow from all
  </Directory>
  ErrorLog ${APACHE_LOG_DIR}/error.log
  LogLevel warn
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

And here is the .htaccess:
AddDefaultCharset utf-8

RewriteBase /
Options -Indexes FollowSymLinks MultiViews

RewriteEngine on
RewriteBase /acp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^acp /acp/index.php [L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(?!acp).* index.php [L]

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html

php_value max_execution_time 500
php_value max_input_time 500
php_value upload_max_filesize 30M
php_value post_max_size 30M

php_flag short_open_tag = On

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Satisfied IT, 2018-11-27
@t3g1ng

Judging by the error in the log

[Tue Nov 27 15:44:01.869614 2018] [core:alert] [pid 28242] [client 178.207.76.118:11369] /var/www/.htaccess: Either all Options must start with + or -, or no Option may .
the line Options -Indexes FollowSymLinks MultiViewsmust be changed something like this, Options -Indexes +FollowSymLinks +MultiViewsApache wants it to be explicitly indicated + or -

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question