Author Topic: cgi + apache2 + euphoria configuration  (Read 3799 times)

Offline Ant

  • Newbie
  • *
  • Posts: 2
cgi + apache2 + euphoria configuration
« on: October 27, 2010, 02:13:36 AM »
I am hoping that some one can help me. Two days is too much.

I have installed the programming language called euphoria and I intend to use it as a cgi script in apache. How ever upon running it i get:

Not Found

The requested URL /cgi-bin/foo.exu was not found on this server.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80

When I run a euphori script from the exterm it works just fine by typing out:
/usr/local/apache/cgi-bin/foo.exu

foo.exu is:
#!/home/ant/euphoria/bin/exu
puts(1, "Content-type: text/html\n\n")
puts(1, "<html><head><title>Thank You</title></head>\n")
puts(1, "<body bgcolor=\"#FFFFFF\">\n")
puts(1, "hi</body>\n")

foo.exu permission is set to: rwxr-xr-x

my relevant environment variables PATH and EUDIR are set to:

PATH=/home/ant/euphoria/bin:/var/lib/euphoria/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:.
EUDIR=/home/ant/euphoria


My apache2.conf file includes:
#--------------------------------------------------------------------
ServerRoot "/etc/apache2"

LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>
<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>
<IfModule mpm_event_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
#--------------------------------------------------------------------

So from the browser request: http://localhost/cgi-bin/foo.exu I get a not found error.

By the way I am using ubuntu 10.04

If you could please help I would be ever so grateful.

Thanks,
Ant

Ubuntu Forums (Ubuntu Linux Support)

cgi + apache2 + euphoria configuration
« on: October 27, 2010, 02:13:36 AM »

Offline Ant

  • Newbie
  • *
  • Posts: 2
Re: cgi + apache2 + euphoria configuration
« Reply #1 on: October 28, 2010, 08:50:20 PM »
Well I figured out a work around. I found that if I use a directory called cgi-bin I get the error. Upon changing the name of the directory to anything else but cgi-bin it works. I thought this info might save some one a lot of time since so many examples use the cgi-bin directory name.