[Solved] NCP - After update from 13 to 14 apache wont start - AH00526: Syntax error on line 1 of /etc/apache2/conf-enabled/javascript-common.conf

Nextcloud version:
Operating system: nextcloudpi 4.14.79
Apache: 2.4.25
PHP version: 7.0

The issue you are facing:

  • decided its time to update nextcloudpi
  • ssh in to it
  • first I run apt update and apt upgrade
  • restart
  • then I run sudo nextcloudpi-config
  • and in its tool section nc-update and nc-update-nextcloud
  • after restart apache wont start

systemctl status apache2

systemd[1]: Starting The Apache HTTP Server...
apachectl[5846]: AH00526: Syntax error on line 1 of /etc/apache2/conf-enabled/javascript-common.conf:
apachectl[5846]: Invalid command 'Alias', perhaps misspelled or defined by a module not included in the server configuration

content of javascript-common.conf

Alias /javascript /usr/share/javascript/

<Directory "/usr/share/javascript/">
        Options FollowSymLinks MultiViews

Is this the first time you’ve seen this error? (Y/N):


The output of your config.php

$CONFIG = array (
  'passwordsalt' => 'Masdasdasdasdsd52awDKG5ZpFPh9hwxX',
  'secret' => '9Casdsdasddasdasdasdasdqi9MJ/MybETf',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    1 => '',
    2 => 'asdasdasdasdasdasdasdsasdsa.duckdns.org',
    3 => '10.0.0.*',
    4 => 'asdasdasdasdasdasdasdsasdsa.duckdns.org',
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://asdasdasdasdasdasdasdsasdsa.duckdns.org',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'eSj*Asassadadadasdsdsadasd*kIW@hXX',
  'installed' => true,
  'instanceid' => 'ocs86rkb115syt',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '8Easdasdasdasdasdasdsasdasdasd3rcvF37nQ=',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'overwriteprotocol' => 'https',
  'loglevel' => '2',
  'log_type' => 'file',
  'maintenance' => false,
  'theme' => '',

The output of your Apache/nginx/system log in /var/log/____:

[Sat Jan 12 06:25:02.854711 2019] [ssl:warn] [pid 25593:tid 1996152080] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Jan 12 06:25:03.000349 2019] [mpm_event:notice] [pid 25593:tid 1996152080] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2q configured -- resuming normal operations
[Sat Jan 12 06:25:03.000437 2019] [core:notice] [pid 25593:tid 1996152080] AH00094: Command line: '/usr/sbin/apache2'
[Sat Jan 12 15:22:18.051437 2019] [mpm_event:notice] [pid 25593:tid 1996152080] AH00491: caught SIGTERM, shutting down

Alright, with no answers next day I did the unimaginable and commented out the thing it complained about
in the file /etc/apache2/conf-enabled/javascript-common.conf
the first line Alias /javascript /usr/share/javascript/ -> # Alias /javascript /usr/share/javascript/

all seems to be working fine now.

Same here. And same thing fixed the problem

This is exactly what I did, and it worked!

For the noobs out there, if you try to “cd” (change directory) to /etc/ but get “Permission denied”, then you need to type:
sudo -i
That way, you get root permissions to access (source URL)

Then you just “cd” all the way to /etc/apache2/conf-enabled/

Then you type: sudo nano javascript-common.conf because “nano” is a text editor.

Then follow @DoTheEvo instructions, by adding a Hashtag “#” in the first line to comment out the # Alias /javascript /usr/share/javascript/

Save then run the systemctl start apache2command, and it should work.

Thank GOODNESS for this, or else I would have to reset my entire server and give up.


a2enmod alias
service apache2 restart