Livecode Server on Ubuntu Linode

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
fpierron
Posts: 56
Joined: Thu Dec 16, 2010 11:12 am
Location: Paris, France
Contact:

Livecode Server on Ubuntu Linode

Post by fpierron » Thu Sep 06, 2012 2:20 pm

Hi,

After reading docs and asking to google, my apache2 conf do not work.

If someone has the clue, it would be great.

my httpd.conf is empty, as usual on ubuntu on Linode.
The 000-default file has the conf data with :

Code: Select all

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /srv/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory "/srv/www/">
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
              AddHandler livecode-script .lc
              Action livecode-script /livecode-cgi/livecode-server
	</Directory>
	
	ScriptAlias /livecode-cgi/livecode-server /srv/www/livecodeServer/livecode-server

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>
	
	     <Directory "/srv/www/livecodeServer/">
          Options ExecCGI
          Order allow,deny
          Allow from all
      </Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
I have put the livecode server every where to try without any success.

Instead of launching the script, it shows it as text in the browser.

Any idea ? thanks in advance.

Frédéric

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Livecode Server on Ubuntu Linode

Post by sturgis » Thu Sep 06, 2012 6:09 pm

First thing I notice is that your script alias points to the executable not just the containing folder.
ScriptAlias /livecode-cgi/livecode-server /srv/www/livecodeServer/livecode-server

Notice the one below it just points to folder
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/


So you might change your scriptalias to

ScriptAlias /livecode-cgi/ /srv/www/livecodeServer/

Or even easier, just put livecode-server and its folders into /usr/lib/cgi-bin/ and don't bother adding an alias.

Also, check permissions and ownership, and... did you restart apache after editing the conf file?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Livecode Server on Ubuntu Linode

Post by bangkok » Thu Sep 06, 2012 9:10 pm

You might find some clues here :

My experience with Livecode server on a Ubuntu machine, with Apache.

http://forums.runrev.com/phpBB2/viewtop ... =20&t=5543

fpierron
Posts: 56
Joined: Thu Dec 16, 2010 11:12 am
Location: Paris, France
Contact:

Re: Livecode Server on Ubuntu Linode

Post by fpierron » Thu Sep 06, 2012 9:43 pm

Hello

Thanks for your help.
I have found a solution that works with that Linode server + ubuntu 10.04

For the 000-default conf file in /etc/apache2/site-enabled, you just add :

Code: Select all

	    AddHandler livecode-script .lc
        Action livecode-script /cgi-bin/livecode-server
in this directive :

Code: Select all

	<Directory /srv/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		Allow from all
	    AddHandler livecode-script .lc
        Action livecode-script /cgi-bin/livecode-server
	</Directory>

Then for your Vhost, you write :

Code: Select all


ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin/"
<VirtualHost *:80>
     ServerAdmin webmaster@mydomain.com
     ServerName mydomain.net
     ServerAlias mydomain.net
     DocumentRoot /srv/www/mydomain/
     ErrorLog /srv/www/mydomain/logs/error.log
     CustomLog /srv/www/mydomain/logs/access.log combined
     
     
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-server
</VirtualHost>
then do not forget to chmod 755 all the cgi-bin

then reload apache.

Post Reply

Return to “CGIs and the Server”