Page 2 of 2

Re: The Perfect Server [SOLVED]

Posted: Tue Jun 02, 2020 9:48 pm
by ghettocottage
..also let us know what linux you are using: Ubuntu 18.04, Debian Stable, etc..

Re: The Perfect Server [SOLVED]

Posted: Wed Jun 03, 2020 11:58 am
by sphere
ghettocottage wrote:
Tue Jun 02, 2020 9:48 pm
..also let us know what linux you are using: Ubuntu 18.04, Debian Stable, etc..
The VPS is running on Ubuntu 18.04 Server 64bits.
I followed this fine tut which was previously based on 18.04 but now for 20.04 : How to Install Joomla with Apache2 and ... on Ubuntu
It uses also ISPconfig which you may not need, but with that you can be a hostcompany yourself.
But the tutorial was interesting for me as i had no knowhow enough to set it up, and this is just great with also good support.
It also uses Let's Encrypt so you can use HTTPS aswel on your server. ClamAV or other anitvirus. Email setup. and Fail2ban which blocks IP's when failing to login for 5 times etcetera.

And then for the server you can follow the post above where i finally got it working. I also asked a few question on their site and they helped me as far as they could.

Hope this helps. If not let me know.

Re: The Perfect Server [SOLVED]

Posted: Wed Jun 03, 2020 3:56 pm
by ghettocottage
Basically, you need to do the following:
  • put the livecode-server binary in /usr/lib/cgi-bin along with the folder it has in the zip file (when you download it)
  • make it executable: sudo chmod a+x /usr/lib/cgi-bin/livecode-server (or sudo chmod a+x /usr/lib/cgi-bin/livecode-community-server )
  • in your websites apache conf file in /etc/apache2/sites-enabled you want to add the following:

Code: Select all

<VirtualHost *:80>	
	AddHandler livecode-script .lc
       Action livecode-script /cgi-bin/livecode-community-server
       
       
       	<Directory /var/www/yourwebsitefolder>
		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>
    
    	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>
 ..
    
and further down or on your ssl site conf do the same thing:

Code: Select all


<IfModule mod_ssl.c>
<VirtualHost *:443>

	AddHandler livecode-script .lc
       Action livecode-script /cgi-bin/livecode-community-server
       
       
       	<Directory /var/www/yourwebsitefolder>
		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>
    
    	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>
		
		
...


  • Finally, enable the apache mods you need:
sudo a2enmod actions
sudo a2enmod rewrite
sudo a2enmod cgi
sudo a2enmod alias
  • sudo service apache2 restart


it should be working now.

Re: The Perfect Server [SOLVED]

Posted: Wed Jun 03, 2020 8:49 pm
by keliko
Big Thanks ghettocottage and sphere.

In case im using
- digital ocean ubuntu Ubuntu 18.04.3 (LTS) x64
- vestacp panel with configuration:
web: apache
DNS: No
Remi: Yes
FTP: vsftpd
Firewall: iptables+fail2ban.
System quota:no
mail: no
Softaculous:no
DB: Mysql

after successfully installing vestacp I add the domain. example: lcservertest.com

path lcservertest.com
/home/admin/web/lcservertest.com

- edit 000-default.conf
sudo nano /etc/apache2/sites-enabled/000-default.conf

this my 000-default.conf

Code: Select all

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /home/admin/web/lcservertest.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    AddHandler livecode-script .lc
Action livecode-script /cgi-bin/livecode-server
       
       
       	<Directory /home/admin/web/lcservertest.com/public_html>
		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>
    
    	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>


<IfModule mod_ssl.c>
<VirtualHost *:443>

	AddHandler livecode-script .lc
       Action livecode-script /cgi-bin/livecode-server
       
       
       	<Directory /home/admin/web/lcservertest.com/public_html>
		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>
    
    	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>
</VirtualHost>
after restarting apache. i upload lc file with

Code: Select all

<?lc
put the version
?>
unsuccessfully displaying the lc server version. What wrong with my configuration?

Re: The Perfect Server [SOLVED]

Posted: Wed Jun 03, 2020 9:21 pm
by sphere
well this is where the tricky things start.
I had to alter a vhost file as mentioned in a post above. And i also had the opportunity to add a piece of script into ISPconfig which then takes care of it.
But i don't know if that counts for you too.

So different setups makes different possibilities/issues. For me the final point was the Alias which was not pointing correctly to the correct folder.

Re: The Perfect Server [SOLVED]

Posted: Wed Jun 03, 2020 10:09 pm
by ghettocottage
Do you own the domain lcservertest.com and have it pointed at your VPS? You cannot just make up a domain and have it work.

What happens when you go to the IP address of your server?

Also, when you put your website folder in your home directory rather than the default /var/www folder, you will also need to change permissions of that folder so apache2 user can access it:

sudo chown -R www-data:www-data /your/website/folder

Re: The Perfect Server [SOLVED]

Posted: Thu Jun 04, 2020 6:37 am
by keliko
yes mydomain lcservertest.com point "A" record to my ip.


when i go to my ip.
show only vestacp

Code: Select all

159.65.34.xx
vestacp.example.com
Powered by VESTA
maybe I will try to install the lamp stack whitout vestacp.

Re: The Perfect Server [SOLVED]

Posted: Thu Jun 04, 2020 7:15 am
by keliko
Big Thanks sphere and ghettocottage.
:D :D :D
finally succeeded install livecode server on vps.

i don't use vestcp
install lamp stack from digitalocen marketplace
https://marketplace.digitalocean.com/apps/lamp

then follow the steps from ghettocottage.
https://forums.livecode.com/posting.php ... 5#pr192600

surely succeed.

Re: The Perfect Server [SOLVED]

Posted: Thu Jun 04, 2020 12:32 pm
by sphere
Great! Good for you.

Re: The Perfect Server [SOLVED]

Posted: Wed Jan 12, 2022 6:48 am
by jharris
Just want to say thank you. The information was valuable while setting up my VPS.

LiveCode should really do something about the documentation.

Re: The Perfect Server [SOLVED]

Posted: Wed Jan 12, 2022 10:06 am
by FourthWorld
jharris wrote:
Wed Jan 12, 2022 6:48 am
Just want to say thank you. The information was valuable while setting up my VPS.

LiveCode should really do something about the documentation.
They try to keep the Lessons up to date. Which part failed for you?