Re: include files on cgi-bin

new topic     » goto parent     » topic index » view thread      » older message » newer message
achury said...

What is the best location for euphoria interpreter and includes?

I assume you want to use Euphoria 4.1 for this and not anything earlier. You're likely on 64-bit Linux and Euphoria 4.1 is the only available 64-bit build.

https://github.com/OpenEuphoria/euphoria/releases/tag/4.1.0

Assuming your web files are in /home/user/public_html I recommend extracting the Euphoria package to /home/user/euphoria.

Edit the Euphoria configuration file /home/user/euphoria/bin/eu.cfg to reflect its current location:

[all] 
-d E64 
-eudir /home/user/euphoria 
-i /home/user/euphoria/include 
[translate] 
-arch ix86_64 
-gcc 
-con 
-com /home/user/euphoria 
-lib-pic /home/user/euphoria/bin/euso.a 
-lib /home/user/euphoria/bin/eu.a 
[bind] 
-eub //home/user/euphoria/bin/eub 

(You can probably leave out the [translate] and [bind] sections since you're not using those.)

Add the following settings to your .htaccess file at /home/user/public_html/.htaccess:

# Add CGI handler 
AddHandler cgi-script .ex 
DirectoryIndex index.ex 
Options +ExecCGI 
 
# Deny access to these files 
<Files ~ ".(cfg|err|edb)$"> 
    Deny from all 
</Files> 

Create your CGI scripts and make sure they have execute permissions (755) and a shebang on the first line.

#!/home/user/euphoria/bin/eui 
-- the rest of your app here 

That should do it. I'm still using this method to run this website on an ISPConfig shared host. (ISPConfig is an alternative to CPanel.)

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu