Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I run two ScriptAlias on httpd.conf?

Status
Not open for further replies.

a208

MIS
Oct 26, 2003
33
HK
Our company has only one domain, no virtual domain, but there have two cgi-bin script require to run, one for awstats and one for ksearch, unfortunately,

if I set the following setting, ksearch work, awstats doesn't work

ScritpAlias /cgi-bin/ "/usr/lib/cgi-executive"

If I set

ScriptAlias /cgi-bin/ "/../ then awstats work, but ksearch doesn't work

so can i add following two ScriptAlias in httpd.conf, is it possible to run smooth both ScriptAlias on ksearch and awstats?

ScritpAlias /cgi-bin/ "/usr/lib/cgi-executive"
ScriptAlias /awstats/ "/../
 
I have tested the same by accessing two different cgi scripts and from different location itself
Code:
# cat /etc/httpd/conf/httpd.conf | grep ScriptAlias | egrep -v "#"
...
ScriptAlias /cgi-bin/ "/var/[URL unfurl="true"]www/cgi-bin/"[/URL]
ScriptAlias /cgi-bin2/ "/var/[URL unfurl="true"]www/WEBApp/intake/dealers/cgi-bin2/"[/URL]
...

# ll /var/www/WEBApp/intake/dealers/cgi-bin2
total 4
-rwxr-xr-x 1 root root 90 Aug 12 14:18 first.pl

# ll /var/www/cgi-bin/
total 4
-rwxr-xr-x 1 root root 89 Aug 12 14:20 first.pl


# cat /var/www/cgi-bin/first.pl
[blue]
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World. from default";
[/blue]

# cat /var/www/WEBApp/intake/dealers/cgi-bin2/first.pl
[blue]
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World. from fuse.net";
[/blue]
No other changes were done in the httpd.conf


With Regards
Anirudha Patil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top