|
|
|
|
|
|
| Author |
Message |
Boyle Owen *nix forums Guru
Joined: 07 Feb 2005
Posts: 618
|
Posted: Wed Jul 19, 2006 7:32 am Post subject:
RE: Alias or ScriptAlias ?
|
|
|
| Quote: | -----Original Message-----
From: Matus UHLAR - fantomas [mailto:uhlar@fantomas.sk]
You can also look at AddHandler
(http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler) to
extend CGI to all .cgi files.
I wonder why didn't you start with this
|
And I wonder why you *did* start with this...
Both solutions work, both solutions were mentioned - order is
irrelevant.
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Matus UHLAR - fantomas *nix forums Guru
Joined: 21 Feb 2005
Posts: 430
|
Posted: Tue Jul 18, 2006 2:11 pm Post subject:
Re: Alias or ScriptAlias ?
|
|
|
On 18.07.06 11:48, Boyle Owen wrote:
| Quote: | It is not a great idea to mix static and CGI content in the same
directory since a simple misconfiguration can put your code on the web.
|
I don't think this is a problem. or, better said, such problem can appear
anywhere (e.g. just rename .php to something else)
I find AddHandler simpler and universal:
AddHandler cgi-script .cgi
Options ExecCGI
and it will work globally. If you want to enable/disable CGI's per-context,
you only need to put Options +-ExecCGI into VirtualHost/Directory/Location
secrionc.
| Quote: | You also need "DirectoryIndex script.cgi" in that dir...
|
Or simply index.cgi and let user use proper name for the script...
(e.g. "DirectoryIndex index.var index.cgi index.html")
| Quote: | You can also look at AddHandler
(http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler) to
extend CGI to all .cgi files.
|
I wonder why didn't you start with this
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
42.7 percent of all statistics are made up on the spot.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Mauro *nix forums beginner
Joined: 12 Dec 2003
Posts: 13
|
Posted: Tue Jul 18, 2006 10:23 am Post subject:
Re: Alias or ScriptAlias ?
|
|
|
Thank You
It works fine!!!
----- Original Message -----
From: "Boyle Owen" <Owen.Boyle@swx.com>
To: <users@httpd.apache.org>
Sent: Tuesday, July 18, 2006 11:48 AM
Subject: RE: [users@httpd] Alias or ScriptAlias ?
Something like this might work:
<Location /mydir/script.cgi>
Options ExecCGI
SetHandler cgi-script
</Location>
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Boyle Owen *nix forums Guru
Joined: 07 Feb 2005
Posts: 618
|
Posted: Tue Jul 18, 2006 9:48 am Post subject:
RE: Alias or ScriptAlias ?
|
|
|
| Quote: | -----Original Message-----
From: Mauro [mailto:mauog@interfree.it]
Sent: Tuesday, July 18, 2006 11:28 AM
To: users@httpd.apache.org
Subject: [users@httpd] Alias or ScriptAlias ?
Hi all,
I have my server with its document root running.
Now I would like to add another directory in which:
every user go to www.myserver.mine/mydir/ execute
/myserver/mydir/script.cgi
In this directory there are also some subdirs with css, icons
and html pages I would like web server shows.
If i configure it like
"ScriptAlias"
web server try to execute all inside
If i configure it like
"Alias"
and I add
"DirectoryIndex script.cgi"
"Options +ExecCGI"
web server shows me content of script.cgi without executing it.
|
It is not a great idea to mix static and CGI content in the same
directory since a simple misconfiguration can put your code on the web.
However, it can be done using SetHandler (see
http://httpd.apache.org/docs/2.2/mod/core.html#sethandler) and Options
ExecCGI.
Something like this might work:
<Location /mydir/script.cgi>
Options ExecCGI
SetHandler cgi-script
</Location>
You also need "DirectoryIndex script.cgi" in that dir...
You can also look at AddHandler
(http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler) to
extend CGI to all .cgi files.
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
| Quote: |
Could you help me?
Thank Yoo
Mauro
|
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Mauro *nix forums beginner
Joined: 12 Dec 2003
Posts: 13
|
Posted: Tue Jul 18, 2006 9:28 am Post subject:
Alias or ScriptAlias ?
|
|
|
Hi all,
I have my server with its document root running.
Now I would like to add another directory in which:
every user go to www.myserver.mine/mydir/ execute /myserver/mydir/script.cgi
In this directory there are also some subdirs with css, icons and html pages I would like web server shows.
If i configure it like
"ScriptAlias"
web server try to execute all inside
If i configure it like
"Alias"
and I add
"DirectoryIndex script.cgi"
"Options +ExecCGI"
web server shows me content of script.cgi without executing it.
Could you help me?
Thank Yoo
Mauro |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Fri Nov 21, 2008 9:05 pm | All times are GMT
|
|
Free Ajax Scripts | Books | Loans | Hotels in Central london | Low Interest Credit Card
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|