# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 8000
Listen 8080
Listen 8088
Listen 8888
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Instalación de Passenger
Para instalar Passenger en el servidor (Debian, en este caso), ejecutamos los siguientes comandos:
Vamos a comprobar que el módulo de Passenger se ha instalado correctamente
sudo /usr/bin/passenger-config validate-install
[sudo] password for {user}:
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'
⬢ Passenger itself
‣ ⬢ Apache
-------------------------------------------------------------------------
Checking whether there are multiple Apache installations...
Only a single installation detected. This is good.
-------------------------------------------------------------------------
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
* Checking whether Apache is installed... ✓
* Checking whether the Passenger module is correctly configured in Apache... ✓
Everything looks good. :-)
Creamos el fichero de configuración de nuestro sitio web
<VirtualHost *:8080>
ServerAdmin {email}
ServerName amorenoiborra.es
DocumentRoot "/home/despliegue/Gestion-Hotelera"
PassengerAppRoot "/home/despliegue/Gestion-Hotelera"
PassengerAppType node
PassengerStartupFile index.js
<Directory "/home/despliegue/Gestion-Hotelera">
Allow from all
Options -MultiViews
Require all granted
</Directory>
</VirtualHost>
Indicamos que escuche en el puerto 8080, que es el que hemos configurado en ports.conf, que el directorio raíz de nuestro sitio web es /home/despliegue/Gestion-Hotelera, que el tipo de aplicación es node, que el fichero de inicio es index.js y que el directorio /home/despliegue/Gestion-Hotelera tiene permisos de lectura para todos los usuarios.
Habilitar el sitio
Creamos un enlace simbólico en sites-enabled para habilitar el sitio