[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Apache: Alias and indexing

Asked by illuzian in Apache Web Server

Hi Guys,

I am having issues trying to figure out redirecting /cgi-bin or /script-path to a index.cgi page, as this is an Alias it appears to executing the directory as a script per the apache logs.

[Thu Oct 29 21:04:57 2009] [error] [client x.x.x.x] attempt to invoke directory as script: /usr/lib/cgi-bin/script_path/

What I'm wanting to know:
-Is there any way to get this working easily with mod_rewrite
-If not is mod_rewrite the solution and how would I rewrite a directory to a sript and JUST a directory not every file within it.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
Alias /script_path/ /usr/share/script_path/web/                                                                                                           
Alias /cgi-bin/program /usr/lib/cgi-bin/script_path                                                                                                   
                                                                                                                                                      
<Directory "/usr/share/script_path/web">                                                                                                                
        AllowOverride none                                                                                                                            
        Order allow,deny                                                                                                                              
        Allow from all                                                                                                                                
</Directory>                                                                                                                                          
                                                                                                                                                      
<Directory "/usr/lib/cgi-bin/script_path">                                                                                                              
        AddHandler cgi-script cgi                                                                                                                     
        DirectoryIndex /cgi-bin/index.cgi                                                                                                             
        AllowOverride None                                                                                                                            
        Options +ExecCGI +Indexes +MultiViews +SymLinksIfOwnerMatch +FollowSymLinks                                                                   
        Order allow,deny                                                                                                                              
        Allow from all                                                                                                                                
</Directory>                                                                                                                                          
                                                                                                                                                      
<Directory "/var/lib/script_path/data">                                                                                                                 
        Options FollowSymLinks                                                                                                                        
        AllowOverride None                                                                                                                            
        Order allow,deny                                                                                                                              
        Allow from all                                                                                                                                
</Directory>
 
Related Solutions
Keywords: Apache: Alias and indexing
 
Loading Advertisement...
 
[+][-]10/31/09 03:29 PM, ID: 25711850Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_EXPERT_20070906