- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- running .cgi and .pl scripts in Apache server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2001 02:05 PM
тАО08-28-2001 02:05 PM
running .cgi and .pl scripts in Apache server
I just started the Apache web server on our D210 HP11.i server. When I went to hhtp://ipaddress the default web page show up. I think this is good; however I ran into a few problems when I tried to run my cgi and pl scripts for the site. I did configure the httpd.conf file as follow:
1. ScriptAlias /cgi-bin "/apache/cgi-bin/"
Allowoverride None
Options +ExecCGI
Order allow,deny
Allow from all
where /apache/cgi-bin/ is a file system that contains lots of the Html, Perl and CGI scripts for the site.
2. I also modified:
AddHandler cgi-script .cgi .pl
After the above I restart the server and went to the web to check if my .html, .cgi and .pl files are run - all I see is the Apache's default page. The permission on all the files are 755. I'm so desperate that I even remove my "ScriptAlias" setting and links the default setting to my scripts' file system - no result. I also try to move all of my scripts to the /opt/apache/htdocs dir - all it shows on the web page is as followed:
Name Last modified Size Description
--------------------------------------------------------------------------------
Parent Directory 04-Apr-2001 11:24 -
bw6.img 27-Aug-2001 15:02 26.8M
contact.html 27-Aug-2001 15:03 1k
default.html 27-Aug-2001 15:03 1k
help.html 27-Aug-2001 15:03 3k
info.cgi 28-Aug-2001 15:06 1k
menu.cgi 28-Aug-2001 15:06 6k
temp/ 28-Aug-2001 17:24 -
title.html 27-Aug-2001 15:03 1k
top_menu.cgi 28-Aug-2001 15:06 3k
Can someone please help. Thanks in advance.
Thi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2001 09:11 PM
тАО08-28-2001 09:11 PM
Re: running .cgi and .pl scripts in Apache server
ScriptAlias /cgi-bin/ "/apache/cgi-bin/"
Allowoverride None
Options None
Order allow,deny
Allow from all
To test;
# cp -p /opt/apache/cgi-bin/printenv /apache/cgi-bin
# vi /apache/cgi-bin/printenv
->make change to perl location if needed
from browser
http://ip_address/cgi-bin/printenv
I think you'll be good to go after making changes to your httpd.conf.
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2001 10:57 AM
тАО08-29-2001 10:57 AM
Re: running .cgi and .pl scripts in Apache server
I did as per your suggestion but still not working. I still see the "Index of /" page and then the listing of what I have in my Documentroot/htdocs dir. However, this time I went to the link of one of the file and click to open, I got the "Forbidden: you don't have permission to access /filename on this server" message - I had the permission for both dir. and files to be 755, the owner are "root" and the group is "sys" but still got the same message.
I went and type http://ip_address/cgi-bin/printenv at the browser it printout the environment var. OK. I feel like I'm missing some steps after modifying the httpd.conf file thus enable me to execute any of my .html, .cgi and .pl scripts.
Thi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2001 12:32 PM
тАО08-29-2001 12:32 PM
Re: running .cgi and .pl scripts in Apache server
Are you using for the request
http://ipaddress/cgi-bin/script.whatever
or just
http://ipaddress
You only get the default page with using the last example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2001 12:43 PM
тАО08-29-2001 12:43 PM
Re: running .cgi and .pl scripts in Apache server
cat /opt/apache/lib/cgi-bin/perl-test
#!/opt/perl5/bin/perl
print "Content-type: text/html\n\n";
print "test"
permissions on the file are 755
the 3 lines are needed including the blank line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2001 03:25 PM
тАО08-29-2001 03:25 PM
Re: running .cgi and .pl scripts in Apache server
is specifed by the ErrorLog entry in httpd.conf.
It should have more details on why you are being
denied access to files.
Check the access entries in httpd.conf. Restrictions
can be applied to Directory, File, DirectoryMatch,
or Location. Make sure you don't something
locking access to the files.
The first directory specification in the httpd.conf should
point to your document root. This usually has quite
generous access rights.
If you still have problems check the security_tips.html
file on your server or at
http://httpd.apache.org/docs/misc/security_tips.html
I usually set up an alias to apache available to the
local site to access the documentation pages. Also
use RCS check-in check-out to mantain version control
on your configuration files. It has bailed me out a
couple of times.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2001 07:21 AM
тАО09-13-2001 07:21 AM
Re: running .cgi and .pl scripts in Apache server
Thank you all for your help. I finally fingured out why the HP/Apache default page show up after I set up the Apache server when I typed this http://ipaddress at the browser. The answer lies in the IndexDirective; under that directive in the httpd.conf file you can specified which file to execute first when someone go into your webpage. The default setting from httpd.conf file is the file name call Index.html under /opt/apache/htdocs directory. You can change to whatever file you want in the IndexDirective and it works like a charm.
Again thank you all for all the help in the past.
Thi