You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mahmood Naderan <nt...@yahoo.com.INVALID> on 2018/01/01 07:06:24 UTC
Re: RE: [users@httpd] Problem with CGI script
Dear Eric,
Can you explain a bit more on what should I do with the cgi probblem?
Regards,
Mahmood
On Saturday, December 30, 2017, 9:12:00 PM GMT+3:30, mahmood n <nt...@yahoo.com> wrote:
>You need to scope the SetHandler/AddHandler to just the things that
>are actually CGI. Check the manual.
If you mean this topic (https://wiki.apache.org/httpd/DirectoryAsScript) , I already have read that. But don’t know how to apply that to my case.
Currently, I have
<Directory /var/www/html/rocks/7.0>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/rocks/7.0/install/rolls>
SetHandler cgi-script
DirectoryIndex index.cgi
Allow from all
</Directory>
According to that document, I have to replace ScriptAlias with something else. However, I don’t have such thing! So, I changed that to
<Directory /var/www/html/rocks/7.0>
AddHandler cgi-script cgi py
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/rocks/7.0/install/rolls>
SetHandler cgi-script
DirectoryIndex index.cgi
Allow from all
</Directory>
But the error is still present.
Please let me know which document do you mean.
Regards,
Mahmood
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RE: [users@httpd] Problem with CGI script
Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
OK. The correct thing is to add
<Directory /var/www/html/rocks/7.0/install/rolls>
AddHandler cgi-script .cgi
Options FollowSymLinks Indexes ExecCGI
DirectoryIndex /rocks/7.0/install/rolls/index.cgi
Allow from all
</Directory>
Thanks for your help and ideas Eric.
Regards,
Mahmood
Re: RE: [users@httpd] Problem with CGI script
Posted by Eric Covener <co...@gmail.com>.
http://ce.scu.ac.ir/rocks/7.0/install/rolls/index.cgi returns a 500
error. Troubleshoot it by looking at the logs.
On Mon, Jan 1, 2018 at 11:33 AM, Mahmood Naderan <nt...@yahoo.com> wrote:
>>Maybe I was unclear. Put it back along with AddHandler cgi-script .cgi
>>if you want the subdirs to look like the root.
>
> No it is not OK to have something like this
>
> <VirtualHost *:80>
> ServerName rocks-7-0.my.org
> DocumentRoot /var/www/html/rocks/7.0
> </VirtualHost>
>
> <Directory /var/www/html/rocks/7.0>
> Options FollowSymLinks Indexes ExecCGI
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
> <Directory /var/www/html/rocks/7.0/install/rolls>
> AddHandler cgi-script .cgi
> DirectoryIndex /install/rolls/index.cgi
> Allow from all
> </Directory>
>
>
>
>
> With that config, the root folder is also shown as traditional folder
> structure. You can check with the urls I gave before for sure.
>
>
> Regards,
> Mahmood
>
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RE: [users@httpd] Problem with CGI script
Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
>Maybe I was unclear. Put it back along with AddHandler cgi-script .cgi
>if you want the subdirs to look like the root.
No it is not OK to have something like this
<VirtualHost *:80>
ServerName rocks-7-0.my.org
DocumentRoot /var/www/html/rocks/7.0
</VirtualHost>
<Directory /var/www/html/rocks/7.0>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/rocks/7.0/install/rolls>
AddHandler cgi-script .cgi
DirectoryIndex /install/rolls/index.cgi
Allow from all
</Directory>
With that config, the root folder is also shown as traditional folder structure. You can check with the urls I gave before for sure.
Regards,
Mahmood
Re: RE: [users@httpd] Problem with CGI script
Posted by Eric Covener <co...@gmail.com>.
Maybe I was unclear. Put it back along with AddHandler cgi-script .cgi
if you want the subdirs to look like the root.
On Mon, Jan 1, 2018 at 11:29 AM, Mahmood Naderan <nt...@yahoo.com> wrote:
>>I think someone previously told you to undo:
>> DirectoryIndex /install/rolls/index.cgi
>>But this is what would cause the root index.cgi to be used by the
>>subdirectoryes.
>
>
> Yes I did that and it only works for the main folder where index.cgi exists.
> I am thinking about *recursive cgi* config that execute the cgi for inner
> folders.
> Though I am not about such config due to lack of information.
>
>
> <VirtualHost *:80>
> ServerName rocks-7-0.my.org
> DocumentRoot /var/www/html/rocks/7.0
> </VirtualHost>
>
> <Directory /var/www/html/rocks/7.0>
> Options FollowSymLinks Indexes ExecCGI
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
> <Directory /var/www/html/rocks/7.0/install/rolls>
> AddHandler cgi-script .cgi
> DirectoryIndex index.cgi
> Allow from all
> </Directory>
>
>
>
>
> Regards,
> Mahmood
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RE: [users@httpd] Problem with CGI script
Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
>I think someone previously told you to undo:
> DirectoryIndex /install/rolls/index.cgi
>But this is what would cause the root index.cgi to be used by the
>subdirectoryes.
Yes I did that and it only works for the main folder where index.cgi exists.I am thinking about *recursive cgi* config that execute the cgi for inner folders.Though I am not about such config due to lack of information.
<VirtualHost *:80>
ServerName rocks-7-0.my.org
DocumentRoot /var/www/html/rocks/7.0
</VirtualHost>
<Directory /var/www/html/rocks/7.0>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/rocks/7.0/install/rolls>
AddHandler cgi-script .cgi
DirectoryIndex index.cgi
Allow from all
</Directory>
Regards,
Mahmood
Re: RE: [users@httpd] Problem with CGI script
Posted by Eric Covener <co...@gmail.com>.
I think someone previously told you to undo:
DirectoryIndex /install/rolls/index.cgi
But this is what would cause the root index.cgi to be used by the
subdirectoryes.
On Mon, Jan 1, 2018 at 11:20 AM, Mahmood Naderan <nt...@yahoo.com> wrote:
>>If your app uses *.cgi for CGIs, use AddHandler cgi-script .cgi
>
>>instead of SetHandler.
>
>
>
> Hi,
>
> I did that and now the error has been disappeared.
>
> I tried to define alias and wrote “AddHandler cgi-script .py” which seems to
> be incorrect. Many thanks for your help. Anyway…
>
>
>
>
>
> The cgi in the main folder (where index.cgi exists) runs fine however, in
> subsequent folders there seems to be some problems.
>
>
>
> I am trying to make a mirror of the ROCKS isos. So the original and working
> website is
>
>
>
> http://central-7-0-x86-64.rocksclusters.org/install/rolls/
>
>
>
> and mine is
>
>
>
> http://ce.scu.ac.ir/rocks/7.0/install/rolls/
>
>
>
> If you open the urls, you see the same layout which means cgi is OK.
> However, if you click on any of the folders, you will see different layouts.
> For example, just click on area51. Mine shows the traditional folder
> structure while the original url looks different.
>
>
>
> The ROCKS guys has no idea about that. I don’t know what is the issue to
> search for that. What do you think? Is that related to apache configuration?
>
>
>
>
>
> Regards,
>
> Mahmood
>
>
>
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RE: [users@httpd] Problem with CGI script
Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
>If your app uses *.cgi for CGIs, useAddHandler cgi-script .cgi
>instead of SetHandler.
Hi,
I did that and now the error has beendisappeared.
I tried to define alias and wrote“AddHandler cgi-script .py” which seems to be incorrect. Many thanks for yourhelp. Anyway…
The cgi in the main folder (whereindex.cgi exists) runs fine however, in subsequent folders there seems to besome problems.
I am trying to make a mirror of the ROCKSisos. So the original and working website is
http://central-7-0-x86-64.rocksclusters.org/install/rolls/
and mine is
http://ce.scu.ac.ir/rocks/7.0/install/rolls/
If you open the urls, you see the samelayout which means cgi is OK. However, if you click on any of the folders, youwill see different layouts. For example, just click on area51. Mine shows thetraditional folder structure while the original url looks different.
The ROCKS guys has no idea about that. Idon’t know what is the issue to search for that. What do you think? Is thatrelated to apache configuration?
Regards,
Mahmood
Re: RE: [users@httpd] Problem with CGI script
Posted by Eric Covener <co...@gmail.com>.
If your app uses *.cgi for CGIs, use AddHandler cgi-script .cgi
instead of SetHandler.
On Mon, Jan 1, 2018 at 2:06 AM, Mahmood Naderan <nt...@yahoo.com> wrote:
> Dear Eric,
> Can you explain a bit more on what should I do with the cgi probblem?
>
> Regards,
> Mahmood
>
>
>
>
>
>
>
>
>
> On Saturday, December 30, 2017, 9:12:00 PM GMT+3:30, mahmood n <nt...@yahoo.com> wrote:
>
>
>
>
>
>>You need to scope the SetHandler/AddHandler to just the things that
>>are actually CGI. Check the manual.
>
> If you mean this topic (https://wiki.apache.org/httpd/DirectoryAsScript) , I already have read that. But don’t know how to apply that to my case.
>
> Currently, I have
> <Directory /var/www/html/rocks/7.0>
> Options FollowSymLinks Indexes ExecCGI
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
> <Directory /var/www/html/rocks/7.0/install/rolls>
> SetHandler cgi-script
> DirectoryIndex index.cgi
> Allow from all
> </Directory>
>
>
> According to that document, I have to replace ScriptAlias with something else. However, I don’t have such thing! So, I changed that to
>
> <Directory /var/www/html/rocks/7.0>
> AddHandler cgi-script cgi py
> Options FollowSymLinks Indexes ExecCGI
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
> <Directory /var/www/html/rocks/7.0/install/rolls>
> SetHandler cgi-script
> DirectoryIndex index.cgi
> Allow from all
> </Directory>
>
>
> But the error is still present.
> Please let me know which document do you mean.
>
> Regards,
> Mahmood
>
>
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org