Greetings I am trying to place django in apache I have the configuration as follows:
<VirtualHost *:80>
ServerName test.org
ServerAlias www.test.org
ServerAdmin [email protected]
DocumentRoot /var/www/html/healthsys
WSGIScriptAlias /var/www/html/healthsys/healthsys/wsgi.py
<Directory /var/www/html/healthsys/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
ErrorLog /var/www/html/logs/error.log
CustomLog /var/www/html/logs/custom.log combined
</VirtualHost>
the error it generates is the following:
ene 07 00:47:18 diego-19 systemd[1]: Starting The Apache HTTP Server...
ene 07 00:47:18 diego-19 apachectl[24419]: AH00526: Syntax error on line 7 of /etc/apache2/sites-enabled/000-default.conf:
ene 07 00:47:18 diego-19 apachectl[24419]: WSGIScriptAlias requires at least two arguments, Map location to target WSGI script file.
ene 07 00:47:18 diego-19 apachectl[24419]: Action 'start' failed.
ene 07 00:47:18 diego-19 apachectl[24419]: The Apache error log may have more information.
ene 07 00:47:18 diego-19 systemd[1]: apache2.service: Control process exited, code=exited status=1
ene 07 00:47:18 diego-19 systemd[1]: apache2.service: Failed with result 'exit-code'.
ene 07 00:47:18 diego-19 systemd[1]: Failed to start The Apache HTTP Server.
It is the first time that I try to publish a django project with apache in ubuntu, maybe some suggestion or what I am doing wrong, note I do not use a virtual environment, I use django installed globally, it happened to me in the following tutorial:
Thanks in advance
I always use a virtual environment, but I suppose that using a global environment works just the same.
At the moment I think you have an error in the WSGIScriptAlias line. The format would be like this:
In this link you can see more details link
I would recommend you configure it using daemon mode with the WSGIDaemonProcess and WSGIProcessGroup directives