Web Hosting Talk







View Full Version : Adding domains + general setup


WildWayz
02-17-2001, 05:09 PM
Hi ya all

I know a lot of you talk about Plesk and Cpanel a lot, but I cannot really afford those (this dedicated server I own is a hobby therefor makes no money).

Anyway - how would I go about adding domains?
Does anyone have any step by step instructions on..

Adding domains using Webmin
Using Apache's <virtualname>
adding user accounts so it automatically creates the directories in
/home/<name>
/home/<name>/www
/home/<name>/www/cgi-bin
with the required user.group access and permissions.

I have Red Hat 6.2, PHP4.04pl1, MySQL 3.23.33 and Perl 5.6.0 installed (with Apache 1.3.17).

I am a newbie at webhosting - so please bare that in mind :)

Anything else I should know?

Thanks - I appreciate the help - so far I am ***ting myself as I am in a little too deep :)

--James

guest
02-17-2001, 07:06 PM
Originally posted by WildWayz
Hi ya all

I know a lot of you talk about Plesk and Cpanel a lot, but I cannot really afford those (this dedicated server I own is a hobby therefor makes no money).

Anyway - how would I go about adding domains?

...

Thanks - I appreciate the help - so far I am ***ting myself as I am in a little too deep :)

--James

James, you are in too deep as in needing to get it done for client's, or just not understanding? If you want to do it as a hobby or learn, that's cool. But, if you have clients', think about what you're saying. It looks as though you have client's that need these things and you don't know how to do them without the use of a control panel? Well, obviously not, but this is an issue if you're hosting people. If not, ignore this part. If you are hosting people, then you really have no business hosting people as a hosting company, if you don't know these simple things -- well, not unless you made these people aware that you're learning as you go along. If so, don't worry and take the time to learn how properly and everyone has to start somewhere. Even if that was the case, I suggest you learn more before blowing money on a dedicated server.

If you do have clients and you didn't tell them this, don't take anymore clients and sell out or get help with hosting them. I'd suggest you wait to afford the control panel, but again, if you need this or you're stuck, you need to find a new line of work, or simply make the client's aware you are learning. So, maybe you want to learn it the right way now and not be one of those hosts that depend on a control panel to stay in business, which is very good! So, don't get the wrong impression of my response.

You can write a simple script to do this for you, or you can use commands to do it.

"Adding domains using Webmin"

I've never used it, but it might not do this. If it says itwill, try it. Do you have a DNS serve (name server)? Do you have a process running as "named"? Do you know how to check for the process? Type in "ps aux" and see a list. Do you have zone files in the /var/named or /etc/named directories? An /etc/named.conf and /etc/named.boot file? (Zone files are usually somedomain.com.db or db.domain.com, etc.) If you're running named, do you know how to add to and update zone files and named.conf? I assume you don't, which isn't easy to explain in a simple post, depending on what you're doing. I assume you don't know how to restart named for changes to take effect either? Look in the run level directories (run level 3, specifically) /etc/rc.d/rc3.d/named restart, stop or start. Do you know how to change directories, run commands, etc.?

"Using Apache's <virtualname>"

To only bind an IP address, or a VirtualHost directive, or both? Do you use IP's, or do you use one IP for all the hosting? I'm not sure what exactly you want to know there? How much you know or assume or don't know...

"adding user accounts so it automatically creates the directories in"

You can use "useradd" or "adduser" usually in the /sbin or /usr/sbin directory to add them and declare their home directory paths, the GID and UID of the user, etc. Just type in the command with no arguments (full path, if you haven't the environment path set for that) and it'll tell you.

"/home/<name>
/home/<name>/www
/home/<name>/www/cgi-bin"

The /home/username Should be created when you add the user.

or:

mkdir /home/<name>
mkdir /home/<name>/www
mkdir /home/<name>/www/cgi-bin

or:

mkdir -p /home/<name>/www/cgi-bin for all of it at once.

Then:

chmod 755 -R /home/<name> will set everything at 755 recursively.

"with the required user.group access and permissions."

Refer to above:

chown user.group -R /home/<name>

Bingo, you're done.. but this won't get you going, unless you know these "basic" commands. Again, going back to the client's iussye, really, I don't mean to offend you, but unless you take the time to learn properly and make any client's of your's aware that you have no idea about hosting, then you shouldn't be doing this -- or you need to learn on your own without it affecting other people. If you do know this, then cool and good luck getting going and be GLAD you don't have to learn using the control panel crap, because you'll end up screwing yourself if you depend on it!

I can suggest some good books. But, Redhat.org, Linux.org, Devshed.com and many web searches for certain keywords would be of a better help than anyone here could offer. Nonetheless, I hope this helped and helped to make you understand the issues and hope that you don't have clients. Don't ask me why I got the impression you do, because I suppose you might not. Good luck, I hope this helped.

[Edited by guest on 02-17-2001 at 06:16 PM]

WildWayz
02-17-2001, 07:21 PM
Thanks for the reply :)

When I say I am a n00bie - I mean at webhosting using Linux.
I have only really started to learn linux recently, hence the questions - but I just needed a pushing in the right direction.

I am very quick to learn things, and I have gone out an got a few books that can help (DNS & Bind, Diffinitve Apache Book, Sendmail etc).

I also know how to compile Apache, MySQL, Perl and PHP from scratch - just not get it working 100% (ie perl scripts don't seem to want to execute - but that is probably problems with the way I set up the directories).

I admit, my forté is WinNT systems - having done courses in Systems Admin intermediate and advance - but there is a huge difference between the two, as u know :)

Anyway, I just wanted you to see that I am not just some kid who is doing this hoping to make money from offering a crap service :)
All I do is offer Gaming 'clans' webspace for free :)

Wish me luck, and once again thanks :)

James

WildWayz
02-17-2001, 07:31 PM
oh, and in answer to some of your questions...

I have 24 IP addresses - each domain has one. I am not really after using HTTP1.1 standards ie hosting 100's of IPs off 1 IP address, as not all browsers support it.
Plus it means they cannot use the IP address of the server as it would be shared with others.

By 'in too deep' I mean I am not 100% sure what to do.
I mean I know roughly the right steps - just things like getting permissions right etc is what I stumble on.
I know things like permissions based on an already working domain (from another company, and setting perl files up).

I have always stated to people that I am learning - hence the reason why I do not charge. I would NEVER charge for webhosting at my level of knowledge, as I have a concience :)

Anyway - thanks again for the help :)

James