0

i use my own apache configuration:

localhost.conf

AssignUserID d0tunix d0tunix
ServerName localhost
DocumentRoot /var/www/html
ErrorLog /var/log/apache2/localhost_error_log
CustomLog /var/log/apache2/localhost_access_log combined
ScriptAlias /cgi-bin/ /home/d0tunix/cgi-bin/
DirectoryIndex index.php index.shtml index.html index.htm

<Directory /var/www/html>
    AllowOverride All
    allow from all
    require all granted
    Options +Indexes +Includes +FollowSymLinks
</Directory>

Terminal output

systemctl status apache2.service && journalctl -xe
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2019-10-27 14:04:27 CET; 14min ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 5967 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Okt 27 14:04:27 cryd0tx systemd[1]: Starting The Apache HTTP Server...
Okt 27 14:04:27 cryd0tx apachectl[5967]: AH00526: Syntax error on line 10 of /etc/apache2/sit
Okt 27 14:04:27 cryd0tx apachectl[5967]: Invalid command '\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0All
Okt 27 14:04:27 cryd0tx apachectl[5967]: Action 'start' failed.
Okt 27 14:04:27 cryd0tx apachectl[5967]: The Apache error log may have more information.
Okt 27 14:04:27 cryd0tx systemd[1]: apache2.service: Control process exited, code=exited, sta
Okt 27 14:04:27 cryd0tx systemd[1]: apache2.service: Failed with result 'exit-code'.
Okt 27 14:04:27 cryd0tx systemd[1]: Failed to start The Apache HTTP Server.
lines 1-14/14 (END)

It says that AllowOverride All is a syntax error, but i dont understand why.. on ubuntu 18.04 it works well..

  • If you remove that line, does it start? – Organic Marble Oct 27 '19 at 13:38
  • @OrganicMarble No, now it says: Okt 27 14:39:37 cryd0tx apachectl[8866]: AH00526: Syntax error on line 10 of /etc/apache2/sites-enabled/localhost.conf: Okt 27 14:39:37 cryd0tx apachectl[8866]: Invalid command '\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0allow', perhaps misspelled or defined by a module not included in the server configuration – crydotsnake Oct 27 '19 at 13:40
  • Take a look here: stackoverflow.com/questions/18740419/… You may need sudo a2enmod rewrite – Organic Marble Oct 27 '19 at 13:45
  • @OrganicMarble I have it, i forgot a simple slash after the ScriptAlias /cgi-bin/ /home/d0tunix/cgi-bin/Line thank you!. – crydotsnake Oct 27 '19 at 13:48
  • Glad you got it figured out! – Organic Marble Oct 27 '19 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.