Firewall settings for VNC or other service:

sudo iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

First, you will try to do it on Jessie 8 – But it wont work, and you will try :

to install the ruby ppa.

sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update

if you did it then you must delete the created file in /etc/apt/sources.list.d

If you were not able to install the cmd apt-add-repository so you will try:

sudo apt-get install software-properties-common

Anyway, Ruby ver is limited to 2.1 on jessie. So you will want to upgrade to latest debian distrib (buster, 2019)

you must edit sources.list and after that update/upgrade/dist-upgrade

deb http://httpredir.debian.org/debian buster main 
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main

now install ruby-full package so you are no longer limited to 2.1

sudo apt-get install ruby-full

ayda@vps663660:~$ ruby -v

ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux-gnu]

yeaah!=)

Now you want install the whole team : Apache, Mysql, Php..

You can check a nice method but the packets are deprecated : install all packages missing : https://www.memoinfo.fr/tutoriels-linux/installer-apache-php-mysql-ruby-passenger/

Here are some updated edits from the link above.

/etc/apache2/mods-available/passenger.load

LoadModule passenger_module /var/lib/gems/2.5.0/gems/passenger-6.0.2/buildout/apache2/mod_passenger.so

/etc/apache2/mods-available/passenger.conf

PassengerRoot /var/lib/gems/2.5.0/gems/passenger-6.0.2

PassengerDefaultRuby /usr/bin/ruby2.5

PassengerDefaultUser www-data

 sudo aptitude install  php7.3-mysql libapache2-mod-php7.3  php7.3

Now Create a SSL certificate for you wwwebsite :

sudo apt-get install certbot python-certbot-apache -t buster

setup apache conf

<VirtualHost *:80>       
ServerAdmin admin@yoursitebitch.com
ServerName yoursitebitch.com
ServerAlias www.yoursitebitch.com
DocumentRoot /var/www/html
</VirtualHost>

sudo certbot –apache

Select option 2

Site is secure :^) dont forget to renew certificate

ressources: https://certbot.eff.org/lets-encrypt/debianstretch-apache

Catégories : forGeeks

Laisser un commentaire