LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2005, 08:04 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Apache Newbie cgi-bin question


Ok so I'm trying to move my two domains over to linux/apache since I have a Debian box to play with, I figured it would be a nice crash course, and since neither domain does much except a image dump and host a blog it's nothing super critical.

I ran into a snag with the domain that hosts my blog running Moveable Type. I setup all the permissions and tried to run the mt-check.cgi by going to http://test.domain.com/cgi-bin/mt-check.cgi I get a
Quote:
The requested URL /cgi-bin/mt-check.cgi was not found on this server.
I believe I've narrowed it down to the httpd.conf file, as when I check the logs I see
Quote:
[Tue Apr 26 17:45:17 2005] [error] [client 216.229.107.32] script not found or unable to stat: /usr/lib/cgi-bin/mt-check.cgi
So I grepped the httpd.conf and found
Quote:
nix:/etc/apache# grep -n cgi-bin httpd.conf
588: ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
591:# "/usr/lib/cgi-bin" could be changed to whatever your ScriptAliased
594: <Directory /usr/lib/cgi-bin/>
872:#ErrorDocument 404 /cgi-bin/missing_handler.pl
980:#<Location /cgi-bin/phf*>
So basically if I'm reading this correct Apache is ignoring the actual /cgi-bin/ directory that is in my /domain/cgi-bin/ and is looking to /usr/lib/cgi-bin/

I'm new to linux, so is how it's currently setup (cgi-bin symlinking back to /usr/lib/cgi-bin) the prefered way to handle it? if you are hosting multiple domains wouldn't that leave the cgi-bin quite messy and bothersome for end user management?

I was expecting to just create the /cgi-bin/ folder in domains as needed and make sure the apache user had read and execute permissions. Is this a bad idea and if not how do I change it from how it is now, to how I just discribed?
 
Old 04-26-2005, 11:16 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
When you set up multiple domains, you'll set up a "virtual host" (name or IP based) for all of the different domains. Within each virtual host you can specify a separate ScriptAlias directory so that each virtual host has its own cgi-bin.
 
Old 04-28-2005, 12:32 PM   #3
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by btmiller
When you set up multiple domains, you'll set up a "virtual host" (name or IP based) for all of the different domains. Within each virtual host you can specify a separate ScriptAlias directory so that each virtual host has its own cgi-bin.
Thanks, that did the trick!
 
  


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
Apache server and cgi-bin? WorldBuilder Linux - Networking 15 09-18-2003 12:13 PM
Apache cgi-bin in Mandrake 9.1 Edgemaster Linux - Newbie 1 08-14-2003 01:15 PM
.htaccess and cgi-bin (apache of course) finegan Linux - Software 4 05-01-2003 04:21 PM
no access to cgi-bin within Apache Mackeral Linux - Software 6 05-14-2002 05:15 AM
apache cgi-bin roadie Linux - General 6 06-16-2001 07:15 PM


All times are GMT -5. The time now is 03:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration