I've been given a new domain www.mywebsite.com and I want to point it to a specific directory on my server: var/www/specific/path
What are the steps for doing it ? Could you suggest me a tutorial ?
I need to repeat the same operations for several domains.
thanks
Update:
NameVirtualHost a.b.c.d //I've hidden my real ip
<VirtualHost www.website.com:80>
DocumentRoot /var/www/sites/website
ServerName www.website.com
CustomLog /var/log/apache2/website.com.access combined
</VirtualHost>
I'm assuming you want to host multiple sites on a single IP address and that you're using apache. If so, then essentially, the following lines of code in my httpd.conf do the job for me:
Where a.b.c.d is your server's IP address. Repeat VirtualHost declarations as you need them. The CustomLog declaration isn't vital, but it helps me to keep my sites' logs separately from one another.
You can find more documentation on apache at http://httpd.apache.org/docs/; click on the version of your apache server, then enter (eg) NameVirtualHost in the search box (though the doco for that can also be found directly at http://httpd.apache.org/docs/current/mod/core.html#namevirtualhost - it's not a feature that changes much between versions).