Hi!
I am running a Debian (Linux Mint) and have installed apache2, sqlite3 and downloaded all the requirements for Rockets from here:
http://newlisponrockets.com/rockets-item.lsp?p=99
I am seeing the text of the index.cgi that I have unpacked into /var/www of Rockets when I go to:
http://localhost/index.cgi
Looks like this:
#!/usr/bin/env newlisp
(load "newlisp-rockets.lisp") ; this is where the magic happens!
(page-redirect "rockets-main")
I have done both of these suggestions:
Quote
You could try adding the line:
AddHandler cgi-script .cgi .lsp
To /etc/apache2/sites-available/default (or instead of default, your site name)
If things really don't want to execute, try this:
cd /var/www
sudo nano .htaccess
Add the line "Options +ExecCGI"
from here: http://newlisponrockets.com/rockets-item.lsp?p=99
I am having no problem seeing newLISP here:
/var/www $ /usr/bin/env newlisp
newLISP v.10.6.0 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
> (exit)
Any quick thoughts on what to try? Thanks big! :O)
I think you've done the right thing by asking Jeremy for help... :) Although it sounds like an Apache/file permissions thing, rather than newLISP.
Quote from: "joejoe"
/var/www $ /usr/bin/env newlisp
newLISP v.10.6.0 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
> (exit)
Any quick thoughts on what to try? Thanks big! :O)
Try doing the /usr/bin/env newlisp bit for the Apache user. My guess is that the Apache user can't see newlisp on its PATH. (Just a wild guess.)
This is how I did it on my Ubuntu machine.
1. Find out "who" the Apache user is.
$ grep APACHE_RUN_USER /etc/apache2/envvars
export APACHE_RUN_USER=www-data
2. Run /usr/bin/env newlisp for the Apache user, www-data.
$ sudo su www-data
[sudo] password for <your username>:
$ /usr/bin/env newlisp
newLISP v.10.4.5 64-bit on Linux IPv4/6 UTF-8, execute 'newlisp -h' for more info.
>
Ok, that seems good. (Yeah, that's an old version of newLISP. :))
Hi and thanks for the quick thoughts and suggestions!
I have done here what rickyboy suggested and I think apache user sees nL no problem.
joe@kvskn /var/www $ grep APACHE_RUN_USER /etc/apache2/envvars
export APACHE_RUN_USER=www-data
[...]
$ /usr/bin/env newlisp
newLISP v.10.6.0 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h
Hmm..
-rwxr-xr-x 1 root root 119 May 6 20:30 index.cgi
Would root being owner and group be causing an issue?
Thanks big again for any further poking and prodding! ]
joejoe,
Did Jeremy's advice work out for you?
Jeremy's advice:
Quote
Hi jojo!
Usually if you can't get Apache to execute .cgi scripts (it just shows the text of the page code instead) this means that some other configuration file is overriding the one that you edited.
Apache uses a whole bunch of configuration files depending on what distribution of Linux you are using. Can you tell me what distro you have?
Oh, and no, you don't need to run a nL server. Apache works fine.
This is an example of how I edited my httpd.conf file on CentOS:
<VirtualHost *:80>
ServerAdmin jreimer@demonware.net
DocumentRoot /var/www
<Directory />
Options FollowSymLinks +ExecCGI
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride All
Order allow,deny
allow from all
</Directory>
ServerName alexandria.van.demonware.net
ErrorLog /var/log/error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
Hi rickyboy!
Thanks for the help with this! :D
I did try Jeremy's suggestion. It did not work for me.
My (Debian) Linux Mint said I had to add "+" symbols before everything after Options.
I did that and was able to restart Apache2 successfully.
After trying his Apache config file additions, I got an internal server error.
No idea. I might be in over my head w/ Rockets.
What about just using a nL server w/ Rockets? and forget Apache?
Thank again for everyone's help! :0)