tcsams
By:
tcsams

deploying django app with apache2

August 25, 2017 201 views
Apache Ubuntu 16.04

● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Fri 2017-08-25 09:41:31 MST; 39min ago
Docs: man:systemd-sysv-generator(8)
Process: 6874 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 6836 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Process: 6943 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: * Starting Apache httpd web server apache2
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: *
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: * The apache2 configtest failed.
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: Output of config test was:
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: AH00112: Warning: DocumentRoot [/var/www/fancyfishandveggie.com/public_html] does not ex
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: [Fri Aug 25 09:41:31.380948 2017] [core:error] [pid 6952:tid 139897597433728] (EAI 2)Nam
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/singlepoint.conf:
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: Alias takes two arguments, a fakename and a realname
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: Action 'configtest' failed.
Aug 25 09:41:31 s166-62-39-74.secureserver.net apache2[6943]: The Apache error log may have more information.

here is the file:

<VirtualHost *.80>
WSGIScriptAlias / /var/www/singlepoint/singlepoint.wsgi
ServerName singlepointfarmer.com
Alias /static /var/www/singlepoint/static/
<Directory /var/www/singlepoint/>
Order allow, deny
Allow from all
</Directory>
</VirtualHost>

What is wrong here ?

2 Answers

What is the complete output of /etc/apache2/sites-enabled/singlepoint.conf

Solved that. Now trying to deploy django app singlepoint on singlipointfarmer.com

<VirtualHost 166.62.39.74:80>
ServerName singlepointfarmer.com
ServerAlias www.singlepointfarmer.com
ServerAdmin tcsams@gmail.com
Alias /static /var/www/singlepoint/static
<Directory /var/www/singlepoint/static>
Require all granted
</Directory>

    <Directory /var/www/singlepoint/singlepoint>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

WSGIDaemonProcess singlepoint  python-path=/var/www/singlepoint
WSGIProcessGroup  singlepoint
WSGIScriptAlias / /var/www/singlepoint/singlepoint/wsgi.py

</VirtualHost>

Result
http://www.singlepointfarmer.com
Bad Request (400)

Please help - thanks

Have another answer? Share your knowledge.