Instalar Apache con mod_php, mod_fcgi/PHP5 y PHP-FPM

instalar-apache-con-mod_php-mod_fcgi/PHP5-y-PHP-FPM

ISPConfig 3 permite configurar mod_php, mod_fcgi/PHP, cgi/PHP, y PHP-FPM por cada sitio web.

Se puede instalar Apache2 con mod_php5, mod_fcgid, y PHP con:

yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel php-fpm wget

Luego abrimos /etc/php.ini para cambiar el error reporting, establecer la zona horaria y descomentar cgi.fix_pathinfo=1, ejecutando:

nano /etc/php.ini

Debe quedar como:

[...]
;error_reporting = E_ALL & ~E_DEPRECATED
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
[...]
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP''s
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PAppp.tldTH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
cgi.fix_pathinfo=1
[...]
date.timezone = 'America/Caracas'
[...]

Habilite httpd y PHP-FPM para que comiencen en el arranque e inicie el servicio PHP-FPM.

systemctl start php-fpm.service
systemctl enable php-fpm.service
systemctl enable httpd.service

Finalmente, reiniciamos el Apache:

systemctl restart httpd.service

Ahora vamos a añadir soporte para Let’s encrypt.

mkdir /opt/certbot
cd /opt/certbot
wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto

Ahora ejecute el comando certbot-auto que descargará e instalará el software y sus dependencias.

./certbot-auto

El comando le dirá entonces que “no se encontraron nombres en los archivos de configuración” y le pregunta si continuará, por favor seleccione “c” para cancelar aquí ya que los certs serán creados por ispconfig.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *