Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Web Services
El estudiante ser capaz de:
Instalar y configurar un servidor Web
Objetivo:
Configurar un servidor web, incluir autenticacin, permitir navegar a una red interna.
LPIC-201
Esquema de trabajo
1.
2.
3.
Configuresuservidor.Chequequelassiguienteslneasdelarchivoseencuentrencomoseindica acontinuacin: ServerRoot "/etc/httpd" Listen 192.168.N.1:80 User apache Group apache DocumentRoot "/var/www/html" <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/var/www/html"> DirectoryIndex index.html index.html.var index.php Inicieelservicio servicehttpdstart CreeunapginawebycoloquelaenelDocumentRoot
4.
5.
LPIC-201
vi/var/www/html/index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Lumosity - Iniciar sesin</title> </head> <body> <p>Este es un ejemplo de una pgina web </body>
6.
Abraunnavegadoreingresealapginarecincreada.
7.
Creetressitiosensuservidorutilizandohostvirtuales.Configuresuhttpd.confdelasiguiente manera:
NameVirtualHost 192.168.N.1 <VirtualHost 192.168.N.1> ServerName www.domainN.com DocumentRoot /var/www/html/domainN </VirtualHost> <VirtualHost 192.168.N.1> ServerName www.domain10N.com DocumentRoot /var/www/html/domain10N </VirtualHost> <VirtualHost 192.168.N.1> ServerName www.domain100N.com DocumentRoot /var/www/html/domain100N
Ing. Luis Machado R.
LPIC-201
vi/var/www/html/domain10N/index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Lumosity - Iniciar sesin</title> </head> <body> <p>Este es un ejemplo de una pgina web del dominio 10N </body>
vi/var/www/html/domain100N/index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Lumosity - Iniciar sesin</title> </head> <body> <p>Este es un ejemplo de una pgina web del dominio 100N </body>
9.
10.
Abraunnavegadoreingresealapginasrecincreadas.
LPIC-201
11.
12.
Abraunnavegarycompruebasuconexinhttpsconsupginalocal
LPIC-201
13.
Modifiquesuarchivodeconfiguracinparahabilitarhttpsensusvirtualhosts
NameVirtualHost *:443 <VirtualHost _default_:443> ServerName www.domainN.com DocumentRoot /var/www/html/domainN </VirtualHost> <VirtualHost _default_:443> ServerName www.domain10N.com DocumentRoot /var/www/html/domain10N </VirtualHost> <VirtualHost _default_:443> ServerName www.domain100N.com DocumentRoot /var/www/html/domain100N </VirtualHost>
Descomentelassiguienteslneas:
<IfModule mod_proxy.c> ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from .example.com </Proxy> ProxyVia On <IfModule mod_disk_cache.c> CacheEnable disk / CacheRoot "/var/cache/mod_proxy" </IfModule>
LPIC-201
15. 16.
Reiniciesuservicio. Abraelnavegadoryeditesuspreferencias.
LPIC-201
17.
Configureelproxy.
18. 19.
Intentenavegar. Depermisosparasuredinterna.
<Proxy *> Order Deny,Allow Allow from 192.168.N.0 </Proxy> Reinicieelserviciohttpd. Vulevaaintentarnavegar.
20. 21.
LPIC-201
Desafo: Intenteconfigurarsuproxyparaquenieguesitioscomo:
23.
24.
25.
26.
27. 28.
Desafo: Intenteconfigurarsuproxyparaquenieguesitioscomo:
29.
30.
Reviseelarchivoparaversielusuariofuecreado cat/etc/squid/passwd Aadalassiguienteslneas auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/passwd acl autorizacion proxy_auth REQUIRED http_access allow localnet autorizacion
31.