domingo, 3 de abril de 2011

Clase 2

Instalar

zypper install apache2


Directorio por defecto de la pagina a abrir en Suse

/srv/www/htdocs


Para arrancar el Semonio

rcapache2 start


Para ver los puertos abiertos, existe la herramienta NMAP

zypper install nmap


Creamos un index.html en la carpeta /srv/www/htdocs con el vi

<html>
<head>
<title>Pagina web</title>
</head>
<body>
<h1>linux</h1>
<h3>Alejandro </h3>
</body>
</html>


Para acceder a la pagina web

Para acceder a la pagina escibis en el navegador la ip 127.0.0.1
Para acceder a la pagina de otro equipo es la ip del equipo y ya esta



Ejercicio de Apache

Copiamos el index.html a una nueva carpeta llamada /paginaweb
Editamos el archivo de configuracion con 
vi /etc/apache2/default-server.conf


DocumentRoot "/srv/www/htdocs"     Aca dice que es el directorio por defecto

Y los permisos de acceso son las siguientes lineas
<Directory "/srv/www/htdocs">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs-2.2/mod/core.html#options
    # for more information.
    Options None
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    AllowOverride None
    # Controls who can get stuff from this server.
    Order allow,deny
    Allow from all
</Directory>


El ejercicio es cambiar las lineas en negrita por el directorio que tenemos nuestra pagina, osea /paginaweb

Reiniciamos el demonio apache con  rcapache2 restart



No hay comentarios:

Publicar un comentario