LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-18-2008, 06:09 PM   #1
DorkVader79
LQ Newbie
 
Registered: Jun 2006
Location: The Deathstar
Distribution: Ubuntu 12.04
Posts: 12

Rep: Reputation: 0
/cgi-bin/ not working correctly


I am using Ubuntu 8.04 server to run a web server. I am trying to and a cgi script that I wrote to my page. When I use the
Code:
<--! #exec cgi="/cgi-bin/counter.cgi"-->
tag in my html. It does not execute at all. But if I got to http://192.168.X.X/cgi-bin/counter.cgi I see the correct output is displayed on my browser. I have read several forums and the apache2 docs trying to figure out why. I have seen several different ways to do it. I have tried to XBitHack and had the same results. Also add AddHandler cgi-script .cgi to my mime.conf file. I also installed libapache2-mod-perl2. I also enabled the mod_include for apache. Here are is a paste from my enabled sites. I am not running virtual host so it is pretty much the default from a baseline install for all my conf files.
Code:
	
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

I would greatly appreciate any help or advice.
 
Old 05-19-2008, 03:25 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
I'm not sure as i never worked with SSI but probably you simply have to add the +Includes to the options. Maybe this should be set in the default <Directory>Tag</Directory> or at least in the directory where your html file resides, not only in cgi-bin

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Includes
Order allow,deny
Allow from all
</Directory>

http://httpd.apache.org/docs/2.2/howto/ssi.html

Last edited by j-ray; 05-19-2008 at 03:28 AM. Reason: additional info
 
Old 05-19-2008, 11:21 PM   #3
DorkVader79
LQ Newbie
 
Registered: Jun 2006
Location: The Deathstar
Distribution: Ubuntu 12.04
Posts: 12

Original Poster
Rep: Reputation: 0
I added the +Includes I still have the same symptoms
 
Old 05-20-2008, 12:49 AM   #4
kustomjs
Member
 
Registered: Apr 2007
Posts: 37

Rep: Reputation: 15
I had the same problems with setting up SSL in 7.10 now I have bigger problems I had to reinstall apache2 and now I am crap load of problems.
 
Old 05-20-2008, 02:10 AM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
where did you add the +Includes?
There are various options:
.htaccess file in the directory
or in the httpd.conf for the directory where the html file resides that is calling the script interpreter
or in the basic <Directory> tag

none working -> then i dont know...
 
Old 05-20-2008, 11:40 AM   #6
DorkVader79
LQ Newbie
 
Registered: Jun 2006
Location: The Deathstar
Distribution: Ubuntu 12.04
Posts: 12

Original Poster
Rep: Reputation: 0
I add the +Includes into the <Directory> tag for the /cgi-bin/ directory. I tried the .htaccess file but I may have put it in the wrong place.Should the .htaccess go in the directory ie /usr/lib/cgi-bin or in the the same directory as my conf files.
 
Old 05-20-2008, 11:47 AM   #7
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
try "AllowOverride Options"
 
Old 05-20-2008, 12:47 PM   #8
DorkVader79
LQ Newbie
 
Registered: Jun 2006
Location: The Deathstar
Distribution: Ubuntu 12.04
Posts: 12

Original Poster
Rep: Reputation: 0
Smile problem solved

Well I ended up solving my own problem. I was putting the right commands in the wrong directory. When I added the Options Includes, AllowOveride Options, and XBitHack on in the /var/www directory and not the /usr/lib/cgi-bin. I got the results that I expected on my web page.So my host conf file looks something like this
Code:
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews Includes
		AllowOverride Options
                XBitHack on
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>
 
  


Reply



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
Cgi-bin Cool_Hand_Luke Linux - Newbie 3 04-02-2005 03:32 PM
cgi-bin Question kemplej Linux - Networking 2 11-23-2004 09:54 AM
CGI to work out side of cgi-bin? crashedspine Linux - Newbie 13 09-02-2004 08:49 PM
Cgi-bin Llwyd Linux - Networking 3 03-01-2003 01:46 PM
http://www.burstnet.com/cgi-bin/ads/ad7954a.cgi/3980/RETURN-CODE rverlander LQ Suggestions & Feedback 1 06-07-2002 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:44 PM.

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