Can I create a new configuration file inside etc/apache2/sites-available or etc/apache2/sites-enabled after deleting it by accident?

I was trying to change my old domain to a new domain, but I deleted some of the configurations inside /etc/apache2 by accident.

Now I can’t load the main page (on WordPress) but I am still able to load the forum page (Flarum.) Is there any way I can fix this problem without reinstalling Apache?

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.


Yes, you can create a new configuration file. After the new file is created, you’d simply restart Apache and if all configuration is correct, it should work without any issues. If you run in to trouble or have any questions when creating the new file, feel free to reply and I’ll do my best to help you get things set up.