Question

Issue with .htaccess file and enabling 404

I have created an .htaccess file and have redirected my 404 error to a 404.html page, however, I cannot seem to edit my your virtualhost file (in /etc/apache2/sites-enabled) thus I cannot set AllowOverride to All. When I open the page up in my terminal window on my mac I cannot see anything. Any help would be appreciated. Current IP address for the site is: http://162.243.225.152/


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.

I cannot seem to edit my your virtualhost file

Do you get any errors when you try to do that? Try running the command as root by prepending “sudo” to it:

sudo nano /etc/apache2/sites-enabled/filename