Website not loading - Apache conf problems

My website was opening only using IP after i recreated a droplet using snapshot, then i configured the sudo nano /etc/apache2/sites-available/000-default.conf (created i new file) input the lines requested by this tutorial

where it says to input this:

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName server_domain_name_or_IP <Directory /var/www/html/> AllowOverride All </Directory> . . . (i didnt input the “…”)

meanwhile i remembed a friend told me to recreate the DNS records in digitalocean droplet to this way the new IP would propagate properly then i did.

then i did this in putty: and used these commands afterwards: sudo a2ensite newnewnew-default.conf sudo a2dissite 000-default.conf

now my website have this error:

This webpage has a redirect loop


The webpage at has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

Also i have this error in putty:

service apache2 reload

  • Reloading web server apache2 *
  • The apache2 configtest failed. Not doing anything. Output of config test was: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/ap ache2/sites-enabled/substituir-default.conf: /etc/apache2/sites-enabled/substituir-default.conf:1 : <VirtualHost> was not closed. Action ‘configtest’ failed. The Apache error log may have more information.

p.s(how i see the log)? Thanks.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Your configuration has an opening <VirtualHost *:80> tag so it must close that tag by ending with </VirtualHost>

Because of this your changes are not being picked up.