|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Our students have their own virtual space of WWW homepage in /home/userID/html/,
Their URL are http://aaa.com/~userID/ Now we need to set CGI execable for each directory of users in a subdirectory. The URL is http://aaa.com/~userID/cgi-bin/ Therefore we add a Directory tag in httpd.conf, --Directory "/home/*/html/cgi-bin------- AllowOverride None Options ExecCGI Order allow,deny Allow from all --Directory----------------------------- When we run hello.pl using browser, http://aaa.com/userID/cgi-bin/hello.pl but the browser print the source code of hello.pl. What should we do ? |
|
#2
|
|||
|
|||
|
# add this line to your httpd.conf
AddHandler cgi-script .pl .cgi |
|
#3
|
|||
|
|||
|
I have these line in htt[d.conf:
-Directory /home/*/html- AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec -Limit GET POST OPTIONS PROPFIND- Order allow,deny Allow from all -/Limit- -LimitExcept GET POST OPTIONS PROPFIND- Order deny,allow Deny from all -/LimitExcept- -/Directory- AddHandler cgi-script .cgi .pl ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/" -Directory "/home/httpd/cgi-bin"- AllowOverride None Options ExecCGI Order allow,deny Allow from all -/Directory- -Directory "/home/*/html/cgi"- AllowOverride None Options ExecCGI Order allow,deny Allow from all -/Directory- The result is: HTTP/1.1 200 OK Date: Thu, 18 May 2000 08:14:27 GMT Server: Apache/1.3.12 (Unix) PHP/4.0RC2 mod_layout/1.6 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 OK You don't have permission to access /~gigi/cgi/hello.pl on this server. |
|
#4
|
|||
|
|||
|
It's work
/home/*/html/cgi/hello.pl ----200 OK(Error) /home/*/html/cgi/hello.cgi ---It's work But I don't know why Because /home/httpd/cgi-bin/hello.pl --- It's work |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > How to set CGI execable for each user ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|