By brightfuture
This is a test environment so i dont have a domain.
I have a VPS with apache2 installed and i have a website located at /var/www/html . I access it via going to my ipaddress/index.php
I want to set up another website let’s say at /var/www/site2 and be able to acceess at ipaddress/site2/index.php
How can i achieve this? The guides didn’t really help me i think im losing it somewhere in the /etc/apache2/sites-available configuration.
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!
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.
Hi @brightfuture,
If you want to use the IP address, you can create another folder located in /var/www/html, let’s say exampleFolder. It will be located in /var/www/html/exampleFolder. Additionally, if you want to browse the folder, you’ll need to open ipaddress/exampleFolder.
Now, if you want to open another directory, you won’t be able to use an IP address. Having said that, you can configure a domain of your liking and then edit the host file on your computer to point the domain you have used to your droplet. If you like this idea, let me know and I’ll walk you through it!
Regards, KFSys
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
