Diferencia entre revisiones de «Apache»

De MoodleDocs
m (spanish translation from english page (in progress), tidy up)
m (tidy up)
Línea 1: Línea 1:
{{Pendiente de traducir}}
{{Pendiente de traducir}}
Esta página está muy obsoleta respecto a la versión original en inglés en [https://docs.moodle.org/22/en/Apache Apache]
{{Instalación}}
'''This article refers to the 'Apache HTTP server''''


Cuando la mayoría de la gente se refiere a "Apache", están hablando acerca del Servidor de HTTP de Apache. Aunque en efecto, hablar de Apache es referirnos realmente a la Fundación de Software Apache, la cual aloja una gran cantidad de proyectos, de los cuales el Servidor HTTP es solo uno, posiblemente el más conocido.
The Apache HTTP server is the software that (along with the PHP scripting language) 'runs' Moodle. Note that there are alternatives (e.g. IIS on Windows) but the Apache HTTP Server is very popular on all platforms.  


El Servidor HTTP de Apache permite que las páginas Web sean publicadas en la Internet (o en una intranet o incluso en una máquina de pruebas). El lenguaje de programación PHP, bajo el cual Moodle está desarrollado, está íntimamente integrado con el servidor HTTP. Un servidor Web es un componente requerido en la instalación de Moodle. Hay dos versiones del Servidor HTTP de Apache, la versión 1 y la versión 2. Aunque la Versión 2 debería haber remplazado a la versión 1, las arquitecturas son tan diferentes que ambas continúan siendo soportadas. Incluso tienen soporte completo para PHP y Moodle.
== Installing Apache ==
Installers are available for most platforms from http://httpd.apache.org/download.cgi. The official installation instructions are here: http://httpd.apache.org/docs/2.0/install.html. If you are running Linux then you are recommended to use the packaged version if you can. For example in Debian/Ubuntu it is simply:
<pre>
sudo apt-get install apache2
</pre>


El proyecto del Servidor HTTP de Apache se describe asimismo de la siguiente manera:
See the documentation for your particular platform for the instructions. Apache is straightforward to build from source if you have to and the PHP documentation contains an article on building both Apache and PHP together - although you should rarely need to do that.


"El proyecto del Servidor HTTP de Apache es un esfuerzo para desarrollar y mantener un software de servidor HTTP de código abierto para sistemas operativos modernos, incluyendo UNIX y Windows NT. La meta de este proyecto es proveer un servidor de servicios HTTP seguros, eficientes y extensibles en sincronía con los actuales estándares de HTTP.
==Desempeño==


Apache ha sido el software de servidor Web para Internet más popular, desde abril de 1996. En noviembre del 2005, la encuesta de servidores Web de Netcraft encontró que más del 70% de los sitios Web sobre Internet estaban usando Apache, haciendo esto de manera más completa que todos los otros servidores Web combinados.
See [[Recomendaciones para desempeño]]


==Slasharguments==


== Instalando Apache ==
If the uploaded images are not displayed properly you need to add following directive to httpd.conf or .htaccess :


Actualmente Apache puede ser instalado de manera conjunta con PHP y MySQL, que en combinación son conocidos como la tecnología AMP.
AcceptPathInfo on
Vea [[Instalación AMP]] para detalles.


==SSL==


== Vea también ==
Moodle has an option to enable login pages to force the HTTPS protocol. This is recommended but requires that your web server is configured for SSL. It is possible to run the whole site over HTTPS (typically by configuring Apache to rewrite all http:// URLs to <nowiki>https://</nowiki>) but as this disables caching, there is a considerable performance hit. Only do this if you have a very good reason.
 
'''WARNING: Before switching on login over HTTPS, make very sure that HTTPS is working (just change the http:// to https:// in any Moodle URL). If not, you may lock yourself out'''
 
You have two options for obtaining an SSL certificate:
* generate a self-signed certificate. This is fine on (say) an Intranet but unsuitable for the public internet (except perhaps for testing). The user has no assurance that the certificate is legitimate.
* purchase a certificate from a vendor. There is a surprising range of prices and value-added services available. Some hosting companies even provide free certificates.
 
Below are instructions for install of a self-signed certificate. If you purchase a certificate you will normally receive instructions for installing it
 
===Debian and Apache2===
 
1. generate a certification:
<pre>
apache2-ssl-certificate
</pre>
 
for debian etch, apache2-ssl-certificate is no longer available, use make-ssl-cert instead:
<pre>
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
</pre>
2. edit /etc/apache2/ports.conf:
<pre>
      Listen 80
      Listen 443
</pre>
3. copy /etc/apache)2/sites-available/default to /etc/apache2/sites-available/default-ssl, and change /etc/apache2/sites-available/default:
<pre>
      NameVirtualHost *:80
      <VirtualHost *:80>
      ...
      </VirtualHost>
</pre>
and also /etc/apache2/sites-available/default-ssl:
<pre>
      NameVirtualHost *:443
      <VirtualHost *:443>
      ...
              SSLEngine on
              SSLCertificateFile /etc/apache2/ssl/apache.pem
      ...
      </VirtualHost>
</pre>
4. symbolic link the ssl file:
<pre>
a2ensite default-ssl
</pre>
5. don't forget to symbolic link the ssl module:
<pre>
a2enmod ssl
</pre>
6. restart apache and '''test the connection''' (e.g. https://localhost/):
<pre>
/etc/init.d/apache2 restart
</pre>
 
== See also ==


* [http://httpd.apache.org/ The Apache HTTP Server Project homepage]
* [http://httpd.apache.org/ The Apache HTTP Server Project homepage]
* [http://en.wikipedia.org/wiki/Apache_HTTP_Server Wikipedia article on the Apache HTTP Server]
* [http://en.wikipedia.org/wiki/Apache_HTTP_Server Wikipedia article on the Apache HTTP Server]
* [http://httpd.apache.org/docs/2.0/misc/perf-tuning.html Apache Performance Tuning article at the official homepage]
* [https://els.earlham.edu/cayaraa/weblog/1468.html Making Moodle work with SSL]
* [http://www.krufix.de/ Using the same Moodle twice in local network and Internet via SSL-Proxy] (in German)


[[Category:Administrador]]
[[pl:Apache]]
[[Category:Desarrollador]]
[[ja:Apache]]
[[de:Apache]]
[[en:Apache]]
[[en:Apache]]

Revisión del 20:45 2 ene 2014

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

This article refers to the 'Apache HTTP server'

The Apache HTTP server is the software that (along with the PHP scripting language) 'runs' Moodle. Note that there are alternatives (e.g. IIS on Windows) but the Apache HTTP Server is very popular on all platforms.

Installing Apache

Installers are available for most platforms from http://httpd.apache.org/download.cgi. The official installation instructions are here: http://httpd.apache.org/docs/2.0/install.html. If you are running Linux then you are recommended to use the packaged version if you can. For example in Debian/Ubuntu it is simply:

sudo apt-get install apache2

See the documentation for your particular platform for the instructions. Apache is straightforward to build from source if you have to and the PHP documentation contains an article on building both Apache and PHP together - although you should rarely need to do that.

Desempeño

See Recomendaciones para desempeño

Slasharguments

If the uploaded images are not displayed properly you need to add following directive to httpd.conf or .htaccess :

AcceptPathInfo on

SSL

Moodle has an option to enable login pages to force the HTTPS protocol. This is recommended but requires that your web server is configured for SSL. It is possible to run the whole site over HTTPS (typically by configuring Apache to rewrite all http:// URLs to https://) but as this disables caching, there is a considerable performance hit. Only do this if you have a very good reason.

WARNING: Before switching on login over HTTPS, make very sure that HTTPS is working (just change the http:// to https:// in any Moodle URL). If not, you may lock yourself out

You have two options for obtaining an SSL certificate:

  • generate a self-signed certificate. This is fine on (say) an Intranet but unsuitable for the public internet (except perhaps for testing). The user has no assurance that the certificate is legitimate.
  • purchase a certificate from a vendor. There is a surprising range of prices and value-added services available. Some hosting companies even provide free certificates.

Below are instructions for install of a self-signed certificate. If you purchase a certificate you will normally receive instructions for installing it

Debian and Apache2

1. generate a certification:

apache2-ssl-certificate

for debian etch, apache2-ssl-certificate is no longer available, use make-ssl-cert instead:

make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem

2. edit /etc/apache2/ports.conf:

      Listen 80
      Listen 443

3. copy /etc/apache)2/sites-available/default to /etc/apache2/sites-available/default-ssl, and change /etc/apache2/sites-available/default:

      NameVirtualHost *:80
      <VirtualHost *:80>
      ...
      </VirtualHost>

and also /etc/apache2/sites-available/default-ssl:

      NameVirtualHost *:443
      <VirtualHost *:443>
      ...
              SSLEngine on
              SSLCertificateFile /etc/apache2/ssl/apache.pem
      ...
      </VirtualHost>

4. symbolic link the ssl file:

a2ensite default-ssl

5. don't forget to symbolic link the ssl module:

a2enmod ssl

6. restart apache and test the connection (e.g. https://localhost/):

/etc/init.d/apache2 restart

See also

pl:Apache