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!
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.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.