Help with using multiple domains on a VPS

Status
Not open for further replies.

Funny

Active Member
521
2011
66
0
Hello WJ members,

I have been using Shared hosting since long, recently migrated to VPS. Experimenting and try to learn more of it. So I have this issue, I am not able to successfully add multiple domains on my vps. I have installed Webmin on my Centos 5 32Bit.
I managed to add two separate directories in my public (html) folder and point two different urls to each using BIND. Now the problem is that, I have another directory in my public folder which I want to access only using my IP. But when I go for : http://myip/myfolder it says 404 not found. So definitely the IP is pointing somewhere else rather than the public folder.
Basically I want it to work like this:
In Public, I have 3 directories : dir1 dir2 dir3
Point abc.com to dir1 and xyz.com to dir2 (Working as of now)
Access dir3 only using the servers IP, i.e http://ip/dir3 (Doesn't seem to work)

So guys I need your help to figure out what went wrong.
Thanks for reading. :friends:
 
5 comments
You need edit vhosts according to your requirements,

Also update which webserver you are using, apache / nginx / lighttpd ?
 
Why do you use webmin etc? This ain't that good . If you decide to install Debian on your machine I could help you with setting up as many domains as you will, without any programs. I have a great SSH tutorial to do such things, written by Robin H :D
 
@ServerPolice :
I am using Apache.

@pi0tr3k :
Currently sticking onto Centos. If I am to move to debian, will surely go through your guide. Thanks.
 
On apache, you need to make a vhost file for each domain. It's located in /etc/apache2/sites-enabled/domainname.vhost.
there is a default one too, you can use it as an example ;)

Just copy it ( cp default.vhost nameofyourdomain.vhost ) and edit it to your needs :)
 
Actually I am running Apache2. There is no vhost file in that. Anyway I figured it out. Had to make the edits in etc/conf/httpd.conf file.
 
Status
Not open for further replies.
Back
Top