1) I have several domains: let's say 5 domains. To limit the cost of hosting, i'd like to put these domains all on the same server. I've purchased a VPS, which should contain these domains.
Now I'd like one folder on that VPS per domain. Each domain should directly link to the index page in its linked folder. For example:
www.domain1.com
will link to
x.x.x.x/var/www/html/folder1/index.php
www.domain2.com
will link to
x.x.x.x/var/www/html/folder2/index.php
With x.x.x.x the IP of the VPS.
Please note that it's not an option to user www.domain1.com/folder1. Also, i'd like not to use .htaccess if it's possible. If not, could you please give an example .htaccess script that does the linking?
2) If i want to interlink these domains to let the google bot examine all these domains, should i make sure that the IP's of these domains are different (not on the same subnet)? If so, why aren't other websites that are hosted on let's say the same server, not affected by their IP addresses wrt to the google bot?
Thanks a lot!
Evarest
Do you have a control panel installed on your VPS? This is normally handled transparently by the control panel. If you mention which control panel you have, you can probably get help from somebody familiar with that control panel. It would also be useful to mention the type of VPS. (Xen, Virtuozzo, etc.)
For example, under DirectAdmin, you would go to the Reseller Level, and use Add New User, and fill in the new user name, password, server admin e-mail, enter the domain name, and select the IP address from the drop-down box.
There are different ways of doing this under different control panels, so it's hard to give advice without knowing the details.
Otherwise, it is just a matter of learning the Apache directives for setting-up IP-based and name-based virtual hosts.
My control panel is DirectAdmin. The VPS runs on CentOS and my control panel for the VPS itself is Virtuozzo. The company is <snip> I will try to do as you say when i'm back at home!
Also: is there any good resource of getting to know the commando's for these Apache tricks? I'd like not to use the Control Panel, but automate the procedure a bit...
Thanks a lot already!
[edited by: engine at 2:28 pm (utc) on Oct. 11, 2006]
[edit reason] See TOS [webmasterworld.com] [/edit]
DirectAdmin does all of this for you - perhaps a bit more than you would like. :)
When you add a user in DirectAdmin, it creates a new Linux user. Let's say you add a user "example". It sets up user "example", with home /home/example/ It sets up a public_html directory under that. That's where your documents go.
It also sets up /usr/local/directadmin/data/users/example/. You will find your httpd.conf there. Each user's httpd.conf is included from the main httpd.conf in /etc/httpd/conf.
DirectAdmin writes the necessary Apache directives into each user's httpd.conf so that it will handle the IP address(s) and domain(s) that you set up for that user in the control panel.
They give you a "customization" area in each user's httpd.conf that you can access from the control panel. I don't like that at all. It's only one spot, at the beginning of the file. But it's safe to edit the file directly, as long as you do not do a custom_apache rebuild, and don't make any further changes to that user's server configuration in the control panel. (Best to back this up often in any case!) The main httpd.conf is also safe to edit (with the same caveat) as DirectAdmin will only write to the end of the file, each time you add a user through the control panel.
When I complained to my hosting company about DirectAdmin's intrusiveness and threatened to just go to a Fedora VPS (I'm on Centos as well - in exchange for "stability", one gets older versions of everything, and having to install the latest Apache/PHP/MySQL from source and figure out the quirks of getting DirectAdmin to work with them. OTOH, Fedora Core 5 comes with the latest of everything you'd want already installed...) with no control panel, they told me that DirectAdmin is the least intrusive and most flexible of the popular control panels.
You definately need to spend some time reading the DirectAdmin docs and hanging out on their support forums. It's really designed for a complete idiot. If, like me, you are an incomplete idiot, it takes a bit more work. ;)
It can be a bit of a pain figuring out just what DirectAdmin has it's fingers in. But whoa be to he who ignores that!
Indeed :) I find it quite confusing: admins - resellers & users. I can see the use of it, but for example: why need resellers have to have domains attached to them?
Now i did the following:
ADMIN LEVEL
- I add some IP addresses to IP Management.
- Create Reseller Package
- I set Bandwidth & Disk space to unlimited.
- I set IPs to 10.
- I set Personal DNS's to 2 IP's.
- Create Reseller
- I give in username, password, email
- I give in the domain. I think I can setup a website on this one too?
- Then set Domain IP to Shared - Reseller's IP.
Now I create the reseller. The nameserver's are set to some IPs. I guess that these nameservers are automatically registered at my hosting service, so that the internet knows (in a few days) of their existance?
If i'm correct, i can add as many (different) IP's behind these nameservers as i want. I will only have to point my domain names to these nameservers, and give the IP that lays behind these nameservers. Then users will be redirected to the correct websites?
Then to continue, i switch to RESELLER LEVEL:
- Create Package: Same procedure.
- Click on Add user
- Now i have to select [IP] - Shared - Server
-> This is where i get lost... I'd like to have different IP addresses for each of the websites. However I did add some IP addresses to the IP management, i'm not able to select any of these from the drop down list?
In short: could anyone outline me the procedure to:
- Attach a different folder to each of my domains.
- Set a different IP for each of these domains.
Thanks again!
Keep in mind that this is a general-purpose tool intended for anyone some somebody running a single website to somebody selling to multiple resellers selling to multiple endusers...
You can't just arbitrarily add IP addresses in IP management. The IPs first need to be assigned to you by your ISP! Once they assign you IPs, they will probably automatically add them to DirectAdmin. You only need to do this if they haven't already done it for you. No harm if you add IPs that they haven't assigned - except that they won't work!
As with resellers, no need to create a reseller package, unless you are actually going to delegate creating users to somebody else. It is useful to create a USER package, though, with everything "unlimited". Saves you the trouble of having to set everything to unlimited every time you create an account. Go to the Reseller Level, and "Add Package".
To create a new user, go to the Reseller Level, click on "New User". Enter all that is asked for, drop-down your "unlimited" package from the list of user packages, and drop-down the desired IP from the list of IPs.
Nameservers depends on your ISPs configuration. I prefer to use external third-party nameserver, so I had to go through a bit of rigamarole to turn off the DNS server and keep DirectAdmin from complaining. But it will PROBABLY come pre-configured to automatically add the domain to your ISP-supplied nameservers.
The reason you couldn't add IPs at the reseller level is that you only assigned them to the reseller at the admin level. You also need to assign them to users at the reseller level. Or, as above, skip the reseller stuff altogether, just go directly to the reseller level and assign IPs. Again, you need to request multiple IPs from your ISP first, and they will tell you which ones to use. Your Virtuozzo control panel may tell you this, but I am unfamiliar with that product. (My VPS is Xen and has absolutely no control panel. The control panel is via phone/email. "Please backup my VPS". :)
Names should not take "a few days" to resolve. The longest thing would be when you set your nameserver IPs at your registrar, which I presume you have already done? That could take 24 hours or so, depending on your registrar. How long it takes for names to resolve after you have added them to your nameservers depends on the TTL (time-to-live) you have set. This is typically much shorter, and is under your control, so if you know in advance you are going to change it, you can set it as low as 5 minutes.
I did find DirectAdmin confusing at first, but consider their audience. Most of the time, you will be acting as a "reseller" setting-up "users" for each of your domains.
I've now created a new user and added one domain to that user. However, I don't see how to add other domains to that user. At the moment I resort to creating more users and adding 1 domain to each user. Is this the way to handle things?
BTW: i guess it's impossible to let two or more domains point to a single IP (and of course different folders that contain the webpages of each domain)?
Do i also need to add the domain of that user to this list, so I can add a database to it? And any idea why it's this way? :)
Thanks!