point domains to folders under LAMP (Work of AddonDomains)

Posted January 31, 2015 3.6k views

i have install LAMP on UBUNTU Without Any problem and now if i point my domain to my VPS ip it’s work normally,

i tried use .htaccess but it didn’t work for me

i want to Point many domains to same VPS ip but not displaying the same content i mean that for example The first Domain point to a Sub Folder and the Others to a different Folders if we use For Example CPANEL it’s easy to Click on Addon Domains But Now i don’t have any idea about what should i do? please Help me !
dns lamp point!

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.

Submit an Answer
1 answer

Take a look at:

You will need to create a Virtual Host for each separate domain that you are going to host on your droplet. Make sure you add the needed DNS records as well:

by Justin Ellingwood
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.