< Apache HTTP Server (Español)

Apache HTTP Server (Español)/mod_perl (Español)

Esta traducción de Apache HTTP Server/mod_perl fue revisada el 2020-12-02. Si existen cambios puede actualizarla o avisar al equipo de traducción.

Traducido desde el projecto:

mod_perl junta el poder completo del lenguaje de programación Perl y el Servidor HTTP Apache. Puede usar Perl para administrar Apache, responder a peticiones de las paginas webs y mucho más.

Instalación

Instale en paquete mod_perlAUR.

Configuración

Cargue el modulo a través del archivo de configuración de Apache httpd.conf:

LoadModule perl_module modules/mod_perl.so

Permita a Perl ejecutar scripts en ciertos directorios

Hay dos maneras posibles para habilitar el modulo mod_perl:

Utilizando hosts virtuales

Añada un host virtual con la siguiente configuración. Por ejemplo:

/etc/httpd/conf/extra/httpd-vhosts.conf
<VirtualHost perlwebtest:80>
	Servername perlwebtest
	DocumentRoot /srv/http/perlwebtest
	ErrorLog /var/log/httpd/perlwebtest-error.log
	CustomLog /var/log/httpd/perlwebtest-access.log combined
	<Directory /srv/http/perlwebtest>
		AddHandler perl-script .pl
		PerlResponseHandler ModPerl::Registry
		Options +ExecCGI
		PerlOptions +ParseHeaders
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>
</VirtualHost>

Asegúrese que /etc/httpd/conf/httpd.conf incluya el host virtual creado:

Include conf/extra/httpd-vhosts.conf

Asegúrese que no tenga la opción Options Indexes FollowSymLinks.

Añada «perlwebtest» como host local en /etc/hosts, usando el hostname de la maquina en sunombredehost:

127.0.0.1  localhost sunombredehost perlwebtest

En un subdirectorio

Añada lo siguiente en su archivo de configuración principal:

<code>/etc/httpd/conf/httpd.conf</code>
Alias /perlwebtest/ /srv/http/perlwebtest/
<Location /perlwebtest/>
      AddHandler perl-script .pl
      AddHandler perl-script .cgi
      PerlResponseHandler ModPerl::Registry
      PerlOptions +ParseHeaders
      Options +ExecCGI
      Order allow,deny
      Allow from all
</Location>

Habilite Perl en los listados de directorios

Cree :

E incluyalo en /etc/httpd/conf/httpd.conf:

Pruebelo

Cree en :

#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "mod_perl now works\n";

Reinicie el servicio de Apache y haga que recargue su configuración.

Finalmente, dependiendo en la configuración alternativa elegida, visite:

gollark: We don't actually need paired fluxducts, due to that quirk of their transfer rates. I think.
gollark: Anyway, we can probably just run some itemducts in the planned power cabling tunnels, so it's not too problematic.
gollark: Unless you make the reactor building very big.
gollark: For wiring from the reactor to cells, we can afford most things.
gollark: So if you feed the reactor output straight into a cell and make the cell output into three fluxducts, you could have the actual long range wiring carry all the power, but each machine would only receive 1kRF/t max unless you have a bunch of connections on that machine.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.