[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] www/apache directives & cgi-bin



I have some confusion using the cgiwrapper as to how to name the 
directories and where to put them for the users on the server. So I 
disabled cgiwrapper in the conf files and added a ScriptAlias to the 
Virtual Host directives.

Because I dont want cgi-bin to be in the web directory I placed it in 
root directory of the site and added the ScriptAlias in following example:

ScriptAlias /cgi-bin/ /home/sites/site3/cgi-bin/

I also added 2 other Aliases and changed document root to  
/home/sites/site3/htdocs/ 

The aliases I created were for images and a GeneratedItems directory. The 
latter is necessary for the web designs I do as I use a Javascript 
library for my html files.

Alias /images/ /home/sites/site3/images/
Alias /GeneratedItems/ /home/sites/site3/GeneratedItems/

Notice that I closed them off with a / if I dont, nothing works.

My whole reason for doing this is that all the web sites that I design 
are built with the following directory structure:

In root:
cgi-bin
GeneratedItems
htdocs
images

Reorganizing the sites would be a major time consuming headache and quite 
frankly I really don't want anything other than html pages in the htdocs 
(web) directory. The cgi-bin works but I have not tested anything other 
than a SSI script and that works fine. The curious thing is in my html 
doc I point to cgi-bin as follows /cgi-bin/script.cgi where as I point to 
images as follows ../images/image.jpg

Anyway, my question is: Is it okay to do that, everything works as it 
should and I see no reason why I can't. If there is a major reason not to 
change the directory structure I'd like to know.

By the way, create the directories before you restart apache. :)

Regards
Barry Docherty
MagicCamera Design Services
http://www.magiccamera.com