● 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 ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
What is the complete output of /etc/apache2/sites-enabled/singlepoint.conf
Heya,
For anyone that is stumbling upon this, The error log suggests there are issues with your Apache configuration file, particularly related to the Alias directive and possibly the directory structure. Here’s how you can address the problem step by step:
The Alias directive should look like this:
Alias /static /var/www/singlepoint/static
Remove the trailing slash (/) from the second argument unless it’s strictly needed. Having the slash might cause Apache to misinterpret the path.
Corrected configuration snippet:
Alias /static /var/www/singlepoint/static
Another error in the log:
AH00112: Warning: DocumentRoot [/var/www/fancyfishandveggie.com/public_html] does not exist
This indicates that the specified DocumentRoot in another configuration file does not exist. Ensure all directories referenced in your Apache configuration actually exist.
Run the following commands to verify:
ls -ld /var/www/singlepoint/static
ls -ld /var/www/singlepoint/
If the paths do not exist, create them:
sudo mkdir -p /var/www/singlepoint/static
sudo mkdir -p /var/www/singlepoint
sudo chown -R www-data:www-data /var/www/singlepoint
sudo chmod -R 755 /var/www/singlepoint
The Directory directive in your configuration uses older syntax (Order allow, deny). Starting with Apache 2.4, the recommended syntax has changed to Require directives.
<Directory /var/www/singlepoint/>
Require all granted
</Directory>
After making these changes, validate the Apache configuration using:
sudo apache2ctl configtest
If the syntax is correct, you should see:
Syntax OK
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.