0

On running

apache2 configtest

I get

Syntax error on line 2 of /etc/apache2/sites-enabled/firstweb.conf: Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information.

While On running

apache2 -T

I get

[Sat Nov 07 16:04:57.447763 2020] [core:warn] [pid 23334] AH00111: Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

I can't figure out the problem since I have installed mod_wsgi yet it is showing these errors. Any Idea? I'm running on Ubuntu 20.04

1 Answers1

0

I think the correct way to check the apache config is

apachectl -t

Another way to correct this issue is setting the source of variables like this:

source /etc/apache2/envvars 

(but this way you'l have to do this every time that you restart the server)