View Full Version : Creating multiple sub-domains problem 2

05-02-2007, 04:48 AM
Once you know how to do it, making sub-domains with htaccess and cgi bins is not a problem (except for the restart apache button - see problem 1).

Problem 2

What is a problem, though, is that it takes quite a bit of time! So I have been trying to find a way to speed the process up. I read in another thread that someone had tried to do the whole job in the httpd.config file but that hadn't been successful because another file was changed in the process and this file is owned by root and can't be changed manually.

So I looked at some software solutions:
I tried easyhost lite from cyberscript.net. I tried this on another host and it worked fine - just what we want - easy set up of mini-sites. But it didn't work on our vps. Anyone got easyhost to work for them?

Well, we have root access so let's try something a bit more complicated.
After quite a lot of research I decided that pure ftpd looked like the answer. So I tried that. But pure ftdp didn't compile. According to the compile errors there was no compatible c compiler.

In summary then, making sub-domains via site manager works fine, but is a very slow process if you want to make many sub-domains.
Does anyone have a solution to how this task can be speeded up?


05-02-2007, 09:48 AM
First let me say, "We do not have root access.". :) We have what is called root like access. I know that is getting technical but it can be an important distinction.

I think that the problems you are haveing with both are missing Apps that are available via the Site Manager.

For EasyHost (http://www.cyberscript.net/products/easyhost/) I think you need to install Perl MySQL (http://www.helpdocs.westserver.net/v3/sitemanager/Perl_MySQL.htm). For Pure-FTPd (http://www.pureftpd.org/project/pure-ftpd) you would need GNU Compiler (http://www.helpdocs.westserver.net/v3/sitemanager/GNU_Compiler.htm).

If you have those installed and are still having a problem then let us know and we can try and figure it out. BTW when you refer to programs like you have it is always nice to provide a link to them. I was able to look them up pretty easy via Google but it saves time for the folks helping you if you provide the link. ;) It also makes sure that we are all talking about the same thing.

05-02-2007, 11:55 AM
I take your point about the link to software mentioned. In the other thread I mentioned HTML kit (http://www.chami.com/) . If anybody reading this works with files directly on the server and hasn't tried this magnificent piece of software, then they should follow this link and go and get it NOW. It's the best thing since sliced bread!

Is it a good idea to link to the software every time it is mentioned or just the first time? I presume that just once is enough.

Back to the subject at hand...
Yes I did install Perl MySQL for Easyhost. I will come back to this one when I dig up the e-mail response I got from their support.
No I don't have GNU compiler installed. I will do that and try again if we can't resolve the Easyhost question. I think that one would suit me better.

I have previously understood that we do not have true root access, so when Pure ftpd didn't compile I just thought that was the reason. What can and can't be installed in this root like environment is an interesting question.

05-03-2007, 06:08 AM
Yes, when I followed your very useful GNU Compiler (http://www.helpdocs.westserver.net/v3/sitemanager/GNU_Compiler.htm) link I could see that this was what was missing. So I installed that and tried again.

Yes Pure FTPd (http://www.pureftpd.org/project/pure-ftpd) did now compile and make. But when I tried "make install" it tried to install to a root owned folder and stopped with an error.

I have found a number of different "install pure ftpd" help sites on the net and have tried a number of these, but so far without success.

I mentioned before that I actually thought that installing the free version of Easyhost (http://www.cyberscript.net/products/easyhost/) would be enough for my requirements, i.e. quickly setting up a number of mini-users. But even here they suggest that installing pure ftpd would be an improvement. See Enable FTP access using PureFTPd (http://support.cyberscript.net/article.html?id=18)

As yet though I haven't been able to install easyhost either!

I have installed Perl MySQL because easyhost requires: Perl 5.6.0 or above with the DBI and DBD::mysql modules.

I had another go last night and will try again later today.

I will bash on with this because I very much want the possibility to set up these mini-sites quickly, instead of the long process of making sub-domains in the site manager.

05-03-2007, 07:04 AM
What part of setting up sub domains are you thinking you need to do in one of these two programs? You are still going to need to use the Site Manager to create the domains (and Email/FTP users if needed). I don't believe there is any way around that. Other then that all that is needed is to set up the directories you are using and that can be done with EditPlus or any FTP program. I guess I am missing what you are trying to do. :)

I did download EasyHost but simply installed it on my local computer. Did yo install it on your WestHost server?

Updated: Strike thos last comments I just realized I was confuseing HTML Kit with Easy Host. :rolleyes:

You are more then likely going to have to set the prefix to a directory that is not the default in order to get Pure FTPd to install. Many folks well set the directory to /usr/home/username or /home/username when they do this.
./configure --prefix=/home/username

05-03-2007, 08:23 AM
I downloaded the free version of EasyHost and was able to get it installed on a test site. My test site is running WH 3.0 at the moment but that should not make any difference. At what point did the set up of EasyHost fail? Where did you upload the files that come with it? Did you upload them in ASCII mode? Did you change the permissions per the instructions? Sorry for all the questions, I am trying to think of some of the more common mistakes. :)

Pure FTPd well not be usable with the Free version of Easy Host that I can tell. It looks like you have to buy the full version of it to get that capability. The instructions mention a file in the systems directory that is not part of the free version that you have to edit to enable it once you install Pure FTPd.

From what I can tell Easy Host does not allow you to set up sub-domains that I can tell. It simply makes a directory for the user and gives an interface that they can use to upload some files and manage a couple things. Also all the passwords are stored with no encryption! :o I'm not sure how much I like that idea.

05-03-2007, 05:42 PM
Thanks for the tip about --prefix. I also came across that one but haven't tried it yet. Instead I spent half the day trying to install easyhost.

And then here's a funny thing... I mentioned before that I installed it successfully on another host, so I have been trying to install the same files on westhost - with no joy. Then I was going to try again and make a list of the problems, but I thought "let's get a fresh copy first just to make sure!" And what do you know... Bob's yer uncle it worked first time :rolleyes:

I was happy about that, but less happy when you inform me that I will have to buy the full version if I want the ftp facility. I am also a bit cagey about ftp at the moment (problem 1). HTTP uploads will have to suffice.

Regarding the sub-domain bit. When is a sub-domain not a sub-domain?
You can set easyhost so that your user gets an address like:
fred.oursites.bloggs.com instead of www.bloggs.com/oursites/fred
I suppose it is some kind of pseudo sub-domain.

Passwords not encoded :o That wasn't good. I suppose they are in the systems directory. I was thinking of putting that above root as an alias, but still...

What am I tryin to do? What I want is to be able to set up language learning sites at schools. I am quite prepared to make 10 or 20 sub-domains via the site manager for teachers. But I don't want to make 200-300 sub-domains for the students. Everyone can have their own copy of our system. Therein lies the problem. How long do you reckon it will take to make 300 sub-domains with site manager? I need a quick and easy solution. I was using webumake before, but that is now abandonware. If anyone has another solution I am very interested to take a look. Something with encrypted passwords would help ;)

05-04-2007, 07:45 AM
What about using something like Wordpress (http://wordpress.org/) ? Although the WH install of it does not support it you can install it manually and they have a "multi site" version of it. If it is just the content you want your users to be able to log in and change that may be the easier way to go. Actually there are other CMS (http://en.wikipedia.org/wiki/Content_management_system) programs out there that allow the same type of thing that may be workable for you. If you don't need to allow your users FTP access or to give them an email address this method would be better.

The passwords are stored in the database but I still don't like that they are not encrypted. :) Yes placeing the systems folder outside your public directories is a good idea and if I recall the password to for the database is in the systems directory. That is pretty common for programs so does not alarm me as much.

05-04-2007, 03:55 PM
I've tested all sorts of CMS packages over a number of years - even WordPress (though I didn't know there was a multi-site version, I'll have another look). But these are most often to complicated for our needs.

I am not going to elaborate on what we are doing because I don't think these forums should be used as an excuse for marketing. But I will say that we have opted for a setup where we make secure mini sites to house our system together with the marvellous sNews (www.solucija.com) CMS.

Easyhost is simple enough for our needs, so too is sNews. This is the way we will go. But if I can also make things a bit more secure by installing pure ftpd then all the better. There are many things that can be done with pure ftpd and some examples of this are given in this article (http://www.geekspeek.org/node/10)

But I do have one last question that I would appreciate some help with:

I have put the easyhost systems directory above root and everything works fine - except the graphics.
It seems like the graphics are still looking for a folder in document root. I think what is needed is a link from document root as well as the alias. How do I make that link?

05-05-2007, 08:08 AM
How do I make that link?
Ok first let me ask if it is looking for images in /system/htdocs/images? I was going to log in and check my install of EasyHost but at the moment my test account is haveing issues. :)

If you answer "Yes" to the above then you have two options. The first option would be to simply copy the images in /path/to/easyhost/system/htdocs/images into /var/www/html/system/htdocs/images.

The second option would be to create a symbolic link via SSH. You would need to first create /var/www/html/system/htdocs. Then cd to /var/www/html/system/htdocs and issue the following command:

ln -s /path/to/easyhost/system/htdocs/images images

That would create a symbolic link in /var/www/html/system/htdocs called images that linked to /path/to/easyhost/system/htdocs/images. Does that make sense?

Actually there would be a third option and that would be to create an alias via your Site Manager. If you have a look at the aliases for your main site you well see one called icons. The icons directory is located at /var/www/icons yet you can access the images in it by typing something like this in your browser -yourdomain.com/icons/text.gif-. The difference between this and the symbolic link method is that you do not "see" the "link" when you log in via FTP or SSH when browsing the directories.

To do this you would log into Site Manager and navigate to Domain Settings > Web Aliases and then click on Add. In the pop up window choose Web alias and then enter the following in the text fields.

URL path name: /system/htdocs/images/
Absolute path name: /path/to/easyhost/system/htdocs/images/

The above instructions are specific to WH 3.0 if you are still on WH 2.0 they are similar but some of the names have been changed to protect the innocent. :) Here are specifics for WH 2.0:

Log into Site Manager and navigate to Domain Management > Web Aliases and click on New Alias. In the pop up window choose Alias and enter the follow in the text fields.

URL path(Alias path name): /system/htdocs/images/
Absolute path name:/path/to/easyhost/system/htdocs/images/

Both WH 3.0 and WH 2.0 are very similar but thought I better give both versions since we are on the edge of switching. BTW an alias is placed in the httpd.conf file and you can manually create them by editing that file. Check your httpd.conf for the icons example.

Don't you just love how there is always more then just one way to accomplish the same thing? I think that if it was me I would choose the second or third option since both would be "dynamic". That way if for some reason the images in /path/to/easyhost/system/htdocs/images where changed or updated the change would be automatic and you would not have to copy the images again.

05-05-2007, 10:13 AM
Thank you very much Wildjoker for helping me in this thread. You have been a great help.

My own investigation led me to the symlink solution. But it wasn't quite clear how to do it, so I was pleased to see your clear instructions.

However, being a bit of a coward I decided to go for option 3

URL path name: /system/htdocs/images/
Absolute path name: /path/to/easyhost/system/htdocs/images/

I had already put an alias to the system folder put above document root, but hadn't realised I should also put an alias to the /system/htdocs/images/ folder. I thought the link to system should be enough.

Anyway, I have done that now and it works fine! (Why didn't I think of that myself :confused: )

Now that everything is working fine I have decided to dig out the credit card and buy the easyhost full version. The last stage of all this will be to install pure ftpd.

If that works too then I will be a happy man.

Thanks again /S

05-06-2007, 06:13 AM

I am glad that I was able to help. :) I would be interested to hear what you think of the full version of EasyHost once you work with it some.