GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Cómo instalar Vanilla Forums con Apache y Lets Encrypt SSL en Ubuntu 20.04 LTS

Vanilla Forums es un software de foro comunitario gratuito y de código abierto escrito en PHP. Es un foro simple, flexible, personalizable y multilingüe que proporciona todas las funciones que necesita para ejecutar un foro exitoso. Ofrece muchos complementos, excelentes opciones de integración y temas para elegir. Viene con un amplio conjunto de características que incluyen inicio de sesión único, foros integrables, inicio de sesión en redes sociales, importación desde otros foros, integración con otros proyectos FOSS y mucho más.

En este tutorial, aprenderemos cómo instalar el software Vanilla Forum con Apache y Let's Encrypt en Ubuntu 20.04.

Requisitos

  • Un servidor con Ubuntu 20.04.
  • Un nombre de dominio válido apuntado con su servidor.
  • Se ha configurado una contraseña raíz en su servidor.

Instalar servidor LAMP

Primero, deberá instalar el servidor web Apache, MariaDB, PHP y otras extensiones requeridas en su sistema. Puede instalarlos todos con el siguiente comando:

apt-get install apache2 mariadb-server php7.4 libapache2-mod-php7.4 php7.4-common php7.4-mysql php7.4-cli php7.4-opcache php7.4-gd php7.4.intl php7.4-curl php7.4-cli php7.4-imap php7.4-mbstring php7.4-soap php7.4-xmlrpc php7.4-xml php7.4-zip unzip git wget -y

Una vez que todos los paquetes estén instalados, edite php.ini y establezca algunos valores deseados:

nano /etc/php/7.4/apache2/php.ini

Cambie las siguientes líneas:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

Guarde y cierre el archivo cuando haya terminado.

Configurar base de datos MariaDB

A continuación, asegure la instalación de MariaDB y establezca la contraseña raíz de MariaDB utilizando el siguiente script:

mysql_secure_installation

Se le solicitarán varias preguntas como se muestra a continuación:

Enter current password for root (enter for none): 
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]:  Y
Reload privilege tables now? [Y/n]:  Y

Una vez que MariaDB sea segura, inicie sesión en MariaDB con el usuario root:

mysql -u root -p

Una vez que inicie sesión, cree una base de datos y un usuario para Vanilla usando el siguiente comando:

MariaDB [(none)]> CREATE DATABASE vanilladb;
MariaDB [(none)]> CREATE USER [email protected] IDENTIFIED BY 'password';

A continuación, otorgue todos los privilegios a la base de datos Vanilla con el siguiente comando:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON vanilladb.* TO [email protected];

A continuación, elimine los privilegios y salga del shell de MariaDB con el siguiente comando:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

En este punto, su base de datos MariaDB está configurada para Vanilla.

Descargar Vanilla

Primero, deberá descargar la última versión de Vanilla desde su sitio web oficial. Al momento de escribir este tutorial, la última versión disponible es Vanilla 3.3. Puedes descargarlo con el siguiente comando:

wget https://open.vanillaforums.com/get/vanilla-core-3-3.zip

Una vez que se complete la descarga, descomprima el archivo descargado usando el siguiente comando:

unzip vanilla-core-3-3.zip

A continuación, mueva el directorio del paquete al directorio raíz web de Apache:

mv package /var/www/html/vanilla

A continuación, cambie la propiedad del directorio Vanilla a www-data y otorgue los permisos adecuados con el siguiente comando:

chown -R www-data:www-data /var/www/html/vanilla
chmod -R 755 /var/www/html/vanilla

Una vez que haya terminado, puede continuar con el siguiente paso.

Configurar Apache para Vanilla Forum

A continuación, deberá crear un nuevo archivo de configuración de host virtual de Apache para servir a Vanilla Forum.

Puedes crearlo con el siguiente comando:

nano /etc/apache2/sites-available/vanilla.conf

Agregue las siguientes líneas:

<VirtualHost *:80>
     ServerAdmin [email protected]
     ServerName vanilla.linuxbuz.com
     DocumentRoot /var/www/html/vanilla/

     <Directory /var/www/html/vanilla/>
          Options +FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog /var/log/apache2/vanilla_error.log
     CustomLog /var/log/apache2/vanilla_access.log combined

</VirtualHost>

Guarde y cierre el archivo cuando haya terminado. Luego, habilite el archivo de host virtual y reinicie el servicio Apache para implementar los cambios:

a2ensite vanilla.conf
systemctl reload apache2

También puede verificar el estado del servicio Apache usando el siguiente comando:

systemctl status apache2

Deberías obtener el siguiente resultado:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-06-25 07:42:29 UTC; 4min 35s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 16070 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
   Main PID: 13697 (apache2)
      Tasks: 6 (limit: 2353)
     Memory: 23.5M
     CGroup: /system.slice/apache2.service
             ??13697 /usr/sbin/apache2 -k start
             ??16074 /usr/sbin/apache2 -k start
             ??16075 /usr/sbin/apache2 -k start
             ??16076 /usr/sbin/apache2 -k start
             ??16077 /usr/sbin/apache2 -k start
             ??16078 /usr/sbin/apache2 -k start

Jun 25 07:42:29 ubuntu20 systemd[1]: Starting The Apache HTTP Server...

En este punto, el servidor web Apache está configurado para servir a Vanilla Forum.

Foro Vanilla seguro con Let's Encrypt

También puede proteger su sitio web de Vanilla Forum con Let's Encrypt SSL. Antes de comenzar, deberá instalar el Certbot en su sistema. Certbot es un cliente de Let's Encrypt que se utiliza para instalar y administrar Let's Encrypt SSL.

Puede instalar el cliente de Certbot ejecutando el siguiente comando:

apt-get install certbot python3-certbot-apache -y

Una vez que Certbot esté instalado, ejecute el siguiente comando para instalar Let's Encrypt SSL para su sitio web.

certbot --apache -d vanilla.linuxbuz.com

Se le pedirá que proporcione su dirección de correo electrónico válida y acepte el término de servicio como se muestra a continuación:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for vanilla.linuxbuz.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/vanilla-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/vanilla-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/vanilla-le-ssl.conf

A continuación, también deberá elegir si desea redirigir o no el tráfico HTTP a HTTPS, como se muestra a continuación:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Escriba 2 y presione Entrar para instalar Let's Encrypt SSL para su dominio:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/vanilla.conf to ssl vhost in /etc/apache2/sites-available/vanilla-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://vanilla.linuxbuz.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=vanilla.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/vanilla.linuxbuz.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/vanilla.linuxbuz.com/privkey.pem
   Your cert will expire on 2020-09-23. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

 - We were unable to subscribe you the EFF mailing list because your
   e-mail address appears to be invalid. You can try again later by
   visiting https://act.eff.org.

Ahora, su sitio web de Vanilla Forum está protegido con Let's Encrypt SSL.

Acceder al Foro Vanilla

Ahora, abra su navegador web y escriba la URL https://vanilla.linuxbuz.com. Debería ver la siguiente pantalla:

Proporcione los detalles de su base de datos, el título de la aplicación, el correo electrónico, el nombre de usuario del administrador, la contraseña y haga clic en Continuar. botón. Debería ver el panel Vanilla en la siguiente pantalla:

Ahora, haga clic en VISITA EL SITIO botón. Debería ver la siguiente pantalla:

Conclusión

¡Felicidades! Ha instalado correctamente el software Vanilla Forum con Apache y lo ha asegurado con SSL gratuito de Let's Encrypt. Ahora puede organizar su propio foro comunitario en un minuto. Siéntase libre de preguntarme si tiene alguna pregunta.


Ubuntu
  1. Cómo instalar Nextcloud con Nginx y Lets Encrypt SSL en Ubuntu 20.04 LTS

  2. Cómo instalar Magento 2 con Nginx y Lets Encrypt SSL en Ubuntu 20.04 LTS

  3. Cómo instalar Shopware con NGINX y Lets encrypt en Ubuntu 18.04 LTS

  4. Cómo instalar Grav CMS con Nginx y Lets Encrypt en Ubuntu 18.04 LTS

  5. Cómo instalar Tiki Wiki con Apache y Lets encrypt SSL en Debian 10

Cómo instalar SuiteCRM con Apache y Lets Encrypt SSL gratuito en Debian 11

Cómo instalar Moodle con Nginx y Lets Encrypt SSL en Ubuntu 20.04

Cómo instalar MediaWiki con Nginx y Lets Encrypt SSL en Ubuntu 20.04

Cómo instalar Gitea con Nginx y Lets Encrypt SSL gratis en Ubuntu 20.04

Cómo instalar Let's Encrypt SSL en Ubuntu con Apache

Cómo instalar Apache con Let's Encrypt SSL en Ubuntu 20.04 LTS