Live Code Community Server on Bitnami LAMP Stack

Deploying to Linux? Get penguinated here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
jonathanbossenger
Posts: 4
Joined: Tue Nov 22, 2016 1:22 pm

Live Code Community Server on Bitnami LAMP Stack

Post by jonathanbossenger » Tue Nov 22, 2016 1:39 pm

Hi folks.

I am assisting a client with setting up the Live Code Community server on their Microsoft Azure Bitnami LAMP stack.

I have followed the instructions available on live code lessons for Installing Live Code Server in Linux with Apache

When I created the test.lc file I am presented with the following message

You don't have permission to access /livecode-cgi/livecode-community-server/test.lc on this server.

This is what I have in my Apache httpd.conf (where [user] is the admin (sudo) user that cant log into the server)

Code: Select all

<Directory "/opt/bitnami/apache2/htdocs">
    Options Indexes FollowSymLinks ExecCGI MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    AddHandler livecode-script .lc
    Action livecode-script /livecode-cgi/livecode-community-server
    Require all granted
</Directory>

<Directory "/home/[user]/livecode-server">
   Options ExecCGI
   Order allow,deny
   Allow from all
</Directory>

ScriptAlias /livecode-cgi/livecode-community-server "/home/[user]/livecode-server/livecode-community-server"
I have setup the permissions as per a pdf I found online

I cannot link to any of the documents as I don't seem to have permission to do so.

For the life of me I cannot figure out what the problem is. Any assistance would be appreciated.

Thanks

shaosean
Posts: 830
Joined: Thu Nov 04, 2010 7:53 am

Re: Live Code Community Server on Bitnami LAMP Stack

Post by shaosean » Tue Nov 22, 2016 2:24 pm

What are the permissions on the "test.lc" file?

jonathanbossenger
Posts: 4
Joined: Tue Nov 22, 2016 1:22 pm

Re: Live Code Community Server on Bitnami LAMP Stack

Post by jonathanbossenger » Tue Nov 22, 2016 7:02 pm

@shaosean 755

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Apr 10, 2012 9:18 am

Re: Live Code Community Server on Bitnami LAMP Stack

Post by ghettocottage » Tue Nov 22, 2016 7:34 pm

Does it work with just a plain html file?

jonathanbossenger
Posts: 4
Joined: Tue Nov 22, 2016 1:22 pm

Re: Live Code Community Server on Bitnami LAMP Stack

Post by jonathanbossenger » Tue Nov 22, 2016 8:08 pm

@ghettocottage yes it does, also php.

I've tried setting the file permissions to 777, no luck.

shaosean
Posts: 830
Joined: Thu Nov 04, 2010 7:53 am

Re: Live Code Community Server on Bitnami LAMP Stack

Post by shaosean » Tue Nov 22, 2016 8:14 pm

Well those seem like the right permissions..

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Apr 10, 2012 9:18 am

Re: Live Code Community Server on Bitnami LAMP Stack

Post by ghettocottage » Tue Nov 22, 2016 9:47 pm

what are the permissions for /livecode-cgi/livecode-community-server

is it set to executable?

chmod +x /livecode-cgi/livecode-community-server

jonathanbossenger
Posts: 4
Joined: Tue Nov 22, 2016 1:22 pm

Re: Live Code Community Server on Bitnami LAMP Stack

Post by jonathanbossenger » Wed Nov 23, 2016 8:14 am

Yes, the livecode-community-server file has been set to include execute permissions as you have specified.

I must also point out that the physical file is located at /home/[user]/livecode-server/livecode-community-server

which as far as I understand is then handled by the ScriptAlias directive

ScriptAlias /livecode-cgi/livecode-community-server "/home/[user]/livecode-server/livecode-community-server"

Do you think it would help to put the livecode server files in the path /livecode-cgi/ and leave out that ScriptAlias?

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 838
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: Live Code Community Server on Bitnami LAMP Stack

Post by dave.kilroy » Thu Nov 24, 2016 12:32 pm

Thanks @shaosean and @ghettocottage

BUMPING this thread - Hi all - I'm the client Jonathan is trying to help setting up LiveCode Server for (I can do basic web services but knew I needed someone much cleverer to set up the server for me)

Can any of you offer advice on how to get LiveCode Server working? I need it for the NHS dementia app I'm working on...

If we can get it working on Azure we'll ensure we explain what we did here so that others can use LiveCode on their own Azure servers

Kind regards

Dave

PS: Moderators - would this thread get more attention in the http://forums.livecode.com/viewforum.php?f=15 thread?
"...this is not the code you are looking for..."

shaosean
Posts: 830
Joined: Thu Nov 04, 2010 7:53 am

Re: Live Code Community Server on Bitnami LAMP Stack

Post by shaosean » Thu Nov 24, 2016 3:03 pm

Sorry.. I have never set up the server (I used to run the CGI engine) and have never used Azure..
If you are able to connect to the server and run commands, you should see if you can get the test.lc file to work there (then we can at least figure out if it is set up or server related)..

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Apr 10, 2012 9:18 am

Re: Live Code Community Server on Bitnami LAMP Stack

Post by ghettocottage » Thu Nov 24, 2016 6:39 pm

I have Livecode Community Server running on a couple of Ubuntu 16.04 vps. This also worked on Ubuntu 14.04.

Install Livecode Community Server on Ubuntu 16.04 64bit

enable the required mods in apache:

Code: Select all

sudo a2enmod cgi
sudo a2enmod alias
sudo a2enmod actions
put the livecode-sommunity-server binary in /usr/lib/cgi-bin and make it executable:

Code: Select all

cd /usr/lib/cgi-bin
wget http://livecodestatic.com/downloads/livecode/8_1_1/LiveCodeCommunityInstaller-8_1_1-Linux.x64
sudo unzip LiveCodeCommunityInstaller-8_1_1-Linux.x64    
sudo chmod a+x /usr/lib/cgi-bin/livecode-sommunity-server 
here is my site-config file, edit yours accordingly:

Code: Select all


<VirtualHost *:80>	
	ServerAdmin admin@youremail.com
	ServerName yourdomain.com
	ServerAlias www.yourdomain.com


	AddHandler livecode-script .lc
        Action livecode-script /cgi-bin/livecode-community-server


	<Directory /var/www/yourdomain.com>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride all
		Order allow,deny
		allow from all
    		DirectoryIndex index.lc
    		DirectoryIndex index.html
    		DirectoryIndex index.php
    		Require all granted
	</Directory>

		<Directory /var/www/yourdomain.com>
			Options Indexes FollowSymLinks MultiViews
			AllowOverride All
			Order allow,deny
			allow from all
		        Require all granted
		</Directory>

		ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
		<Directory "/usr/lib/cgi-bin">
			AllowOverride All
			Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
			Order allow,deny
			Allow from all
		        Require all granted
		</Directory>

	    Alias /doc/ "/usr/share/doc/"
	    <Directory "/usr/share/doc/">
		Options Indexes MultiViews FollowSymLinks
		AllowOverride All
		Order deny,allow
		Allow from all
	    </Directory>

	  # If using Apache 2.4+
	  Require all granted

	</Directory>
           Include conf-available/serve-cgi-bin.conf
</VirtualHost>




and then restart apache:

Code: Select all

sudo service apache2 restart

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 838
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: Live Code Community Server on Bitnami LAMP Stack

Post by dave.kilroy » Thu Nov 24, 2016 6:47 pm

Thanks again guys - I also asked a question referring to this thread on the Use-List (http://runtime-revolution.278305.n4.nab ... l#a4710573) and Peter Wood had a suggestion

Hopefully there is enough here to help Jonathan figure it out...

Kind regards

Dave
"...this is not the code you are looking for..."

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 838
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: LiveCode Community Server on Bitnami LAMP Stack - SOLVED

Post by dave.kilroy » Mon Dec 05, 2016 11:48 am

Huzzah!

The wonderful Simon Smith came to our rescue and spotted the error:
The problem was that CGI was not active on the server

enabled LoadModule cgid_module modules/mod_cgid.so

replaced:

<Directory "/opt/bitnami/apache2/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

with

<Directory "/opt/bitnami/apache2/cgi-bin">
AllowOverride None
Require all granted
AddHandler cgi-script .lc
Options +ExecCGI
</Directory>

(in the apache config file)
Thanks everyone for all your suggestions - relieved we got there in the end!

Kind regards

Dave
"...this is not the code you are looking for..."

Post Reply

Return to “Linux”