|
When you have mastered the previous example, you should be almost ready to tackle almost any
other script available. I say almost, because there are a few more things you need to
know.
The two servers
We've already seen that Spaceports uses two separate servers, but we haven't really explored the
reasons or the uses for each.
For a host to provide extra features such as CGI requires more specialised software than is
standard. Perl has to be installed, and a whole range of extra modules. File
permissions have to be handled differently (HTML, image and sound files are all usable at
666). It is also a security risk.
A server running CGI programs is often a lot less stable, especially when users run scripts that
get out of control. Rather than have a server with static web pages go down for an hour or so
every time this happens, putting 10,000 sites out of action, having the CGI server separate means
that dynamic content only is down for 15 minutes or so. This leaves the static part of the
site intact.
File types
Wherever possible, the following types of files should uploaded to the 'planet' server:-
- Static HTML
- Images
- Sound files
- Movie files
The following types of file must go on the CGI-BIN server to function.
- CGI scripts
- PHP files
- Dynamic HTML pages (such as those using SSI)
- Any file that needs to be written to (such as logs or certain HTML pages)
A warning
Some of you might be thinking that it would be easier to just upload the whole of your site to
the CGI-BIN server. Well, there are several reasons why that is a bad idea:-
- No files on the CGI-BIN server can be linked to from anywhere outside of Spaceports. This
makes a listing in a search engine worthless for example.
- The server goes down more often, for reasons stated above.
- There is a 10 Mb and 1000 file limit on that server. It has been known for that to be
upgraded in special cases, but is unlikely if your entire site is there.
Please bear this in mind whenever you are picking a script to use. If you do a little
research, you can often find one that will work with the bulk of the files on the 'planet'
server.
I will try to collect together a list of scripts that are better suited for use at Spaceports
when I get a chance. There is already a small selection in the CGI section.
|