Reputation: 1023
My friend introduce me Linode and register.com, so I am playing with it now. I already get a domain name, while on my Linode server I am trying to set up a basic webpage so I can start to use it for my personal website. I'm following http://library.linode.com/hosting-website#sph_web-server to set up.
Here's the question, I made a testsite
folder on my linode server, and a /etc/apache2/sites-available/testsite
file which can be called at sudo a2ensite testsite
command. (All of these are part of the tutorial.) But when I wish to switch the content for that website, I created a testsite1
and a /etc/apache2/sites-available/testsite1
, then I do sudo a2ensite testsite1
, but I don't know how to let the apache read the content from my testsite1
folder instead of testsite
folder. The way I did that is I try sudo a2dissite testsite
, so then the content in testsite1
can be read. But I hope there is better way to do that. Also I've heard apache2 can handle multiple server at the same time. How to assign which server load which folder on my linux machine? (For example, if I have abc.net and efg.net, I already link both of them to my linode server, how can I let abc.net go to read the abc folder in my linux server, while the efg.net load my efg folder?) Thanks.
Upvotes: 0
Views: 498
Reputation: 12645
You need to edit the httpd.conf file usually found in /etc/apache2/conf
. Then edit the httpd.conf file and look for "Document Root" setting in this file. Change it to /etc/apache2/sites-available/testsite1
and then restart apache: /etc/init.d/apache2 restart
Upvotes: 1