View previous topic :: View next topic |
Author |
Message |
James Cook -
Joined: 13 Oct 2018 Posts: 13 Location: Michigan USA
|
Posted: Tue Oct 16, 2018 4:37 pm Post subject: Location and path for common cgi-bin |
|
|
I'm new to Abyss, moving form OSX Server.
My server has had all cgi scripts located in /Library/WebServer/CGI-Executables.
With Abyss I've only been able to avoid 404 errors on the cgi when I locate the scripts in a cgi-bin directory within the root folder of every site.
Is there a way to have all cgi scripts in one location, and how would I enter it in the Scripting Parameters? _________________ Jim |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1300
|
Posted: Wed Nov 14, 2018 5:01 pm Post subject: Re: Location and path for common cgi-bin |
|
|
James Cook wrote: | I'm new to Abyss, moving form OSX Server.
My server has had all cgi scripts located in /Library/WebServer/CGI-Executables.
With Abyss I've only been able to avoid 404 errors on the cgi when I locate the scripts in a cgi-bin directory within the root folder of every site.
Is there a way to have all cgi scripts in one location, and how would I enter it in the Scripting Parameters? |
The idea is to use aliases to "share" the same physical location on the hard drive among several sites.
For each of your hosts which will use the CGI scripts in that folder, do the following:
- Open the console, press the "Configure" button associated with the host to change
- Select "Aliases"
- Add a new alias defined as follows:
Code: | Virtual Path: /cgi-bin
Real Path: /Library/WebServer/cgi-bin |
Press "OK".
Now we'll make the .cgi files inside /cgi-bin executable or handled by Perl in Abyss Web Server:
If your .cgi is a Perl script, you could declare Perl support as explained in https://aprelium.com/abyssws/perl.html#mac .
Or:
If all .cgi files in /cgi-bin are correctly set as executables using the Finder (file properties) or the following command:
and if all of them have a shebang line as their first line which looks like:
then the files are executable by the operating system and we'll only need to let Abyss Web Server know that the *.cgi files in /cgi-bin are executable CGI scripts. For that, open "Scripting Parameters" and add in the "Script Paths" table the following path:
Or even a more specific value like:
Code: | /cgi-bin/myscript.cgi |
Press "OK" and restart the host. This should be enough for the host to act as expected.[/list] _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
|