So everytime i type “service apache2 restart” into putty, i get an error
apache2: Syntax error on line 268 of /etc/apache2/apache2.conf: Syntax error on line 30 of /etc/apache2/sites-enabled/000-default: Expected </Directory> but saw </VirtualHost> Action ‘configtest’ failed. The Apache error log may have more information. can anyone help me?
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!
sorry for leaving @hansen, I was really tired and i went to bed… anyway
the site isn’t working and even after doing everything you said and then typing “service apache2 restart” it still said waiting, and I’m following a tutorial that requires you to type that command in order for the website to work… or else you get a 404 error and that’s exactly what’s happenening so no the site doesn’t work :/
@k0ala Just starting a new thread, since it was getting a little narrow.
My guess would be that this is your problem:
<Directory />
Options FollowSymLinks
AllowOverride None </Directory>
Which should look like this:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
But I don’t understand why it says line 30 in the error, when this is clearly not line 30. Anyways, let’s edit the file with this command to make it look like the above:
nano /etc/apache2/sites-enabled/000-default
When you are done editing, hold CTRL
key and press X
key, release keys, press Y
key and press Enter
key.
Now restart Apache service apache2 restart
.
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.