LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-28-2005, 02:14 PM   #1
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 154

Rep: Reputation: 15
cgi under virtual hosts


I am in the process of building my first linux web server using red hat 9 and everything is going fine up to the part where I need to get cgi files to run under a name based virtual host.
I am trying to load a shopping cart that uses php/mysql and .pl files
The php is running fine, mysql is no problem, but the site has a cgi-bin directory that cannot be renamed due to shopping cart variables and whenever I load the site url in a browser and link to anything inside the cgi-bin I get errors because I am being sent to the apache global scriptalias of /var/www/html/cgi-bin
I do not want to run scripts from there but rather run them from the cgi-bin in the virtual host website directory. If I set a scriptalias directive in the virtal host config to the site's /path/to/cgi-bin/ then it finds the scripts and runs them fine but there are subdirectories of cgi-bin that have images and they do not show up (I figure because scriptalias is telling apache that the .jpg filesd are scripts)

I have tried to set options ExecCGI in my .htaccess file in my virtual host/cgi-bin/ and set that directory to allowoverride all but it isnt working either.

Please help.

-vbsaltydog

Last edited by vbsaltydog; 11-28-2005 at 02:15 PM.
 
Old 11-28-2005, 04:54 PM   #2
ViewTopia
LQ Newbie
 
Registered: Nov 2005
Location: Cortlandt Manor, NY
Distribution: FreeBSD, RHEL, CentOS, Slack
Posts: 16

Rep: Reputation: 0
If your not using the global cgi-bin,

just comment out the global alias for it.
 
Old 11-28-2005, 06:39 PM   #3
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 154

Original Poster
Rep: Reputation: 15
I figured it out but I thank you for your reply.

I have another question though...on Red Hat 9, is it possible to use the httpd GUI and make maunual edits to the httpd.conf file?

As it stands now it seems that many of the edits that I make using the GUI for Apache do not take in the httpd.conf and if I edit it manually and then use the GUI after it recognizes the manual edits and only gives me the option to overwrite the manual edits with the GUI changes.

Example: I cant uncomment the addhandler cgi-scripts .cgi .pl from the GUI so I do it manually in the htpd.conf but then I add a virtual directory using the GUI and I am forced to overwrite my manual changes and my addhandler cgi-scripts .cgi .pl is reversed to the default setting.

Any help is appreciated.

-vbsaltydog
 
Old 11-28-2005, 07:23 PM   #4
ViewTopia
LQ Newbie
 
Registered: Nov 2005
Location: Cortlandt Manor, NY
Distribution: FreeBSD, RHEL, CentOS, Slack
Posts: 16

Rep: Reputation: 0
I would recommend staying far away from the gui tool if you can. You've already found one reason why not to use it.

i have never used gui for httpd.conf, but i have seen that with other conf files. (no way around it)
 
Old 11-28-2005, 09:16 PM   #5
vbsaltydog
Member
 
Registered: Nov 2005
Distribution: CentOS
Posts: 154

Original Poster
Rep: Reputation: 15
Thanks for the advise. I will listen and use the conf file only.

-vbsaltydog
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
vqadmin help please (cgi and virtual hosts) nixinbarrie Linux - Software 1 07-18-2005 09:26 PM
virtual hosts and excuting CGI matttail Linux - Newbie 2 08-30-2004 10:04 AM
CGI-BINS for virtual hosts in apache? Trixer Linux - Software 0 06-13-2003 09:15 PM
Question on virtual hosts and CGI-BIN directory cgchris99 Linux - General 9 10-11-2002 11:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration