I want to serve files from my domain in subfolder such as this

I am looking to host more than one site off of a single VPS. However I want to serve files from my domain in subfolder such as this or, or When I visit this url in browser I get a ‘NOT FOUND’ error. How may I fix this? I do not want to use sub-domain, if I can avoid it. Are there any tutorials/resources that treat this use case?

My droplet has LAMP with UBUNTU MYSQL on 16.04.

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.


Go to the root directory of apache web server, as you have already installed LAMP. /var/www/html/

2.Create directory

mkdir students

  1. inside students directory place you index.html file and set the permission to directory 755 and file permission 664

  2. Restart apaceh services and access your newly created directory using public ip address.

Do let me if it works for you.