Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: CGI script organisation

by grep (Monsignor)
on Jan 27, 2002 at 11:02 UTC ( #141896=note: print w/replies, xml ) Need Help??

in reply to CGI script organisation

I set up my directory structure like this.
/mysite /lib #contains modules /config #config information differing prod from dev /www #HTML,flash,... /cgi-bin #obvious /images #obvious
This stucture makes it easy to move from dev to test to production enviroments by setting up enviroment specific files in config. The sensitive information in /lib and /config are also in the same level as the website root so it is not accessable from the webserver (i.e. the webserver does not even know about them),but you can access them by relative paths in your scripts. The more information you keep inaccessable the better. There is no need for a vistor to be able to know anything about database structure, what DBI driver you are using, or if you mistakingly rolled your own query string parser :).

Then the fun part is to get your server locked down so that they can not get to see those files by other means.

grep> cd pub
grep> more beer

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://141896]
[Eily]: LanX how does the first link work, should I send a message to rat? :D
[LanX]: yes, or click the second link
[LanX]: hmm there is an xml ticker for threads

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2018-03-19 09:58 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (238 votes). Check out past polls.