This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
sermn_wiki:userpages:marta:servidor_web [2011/02/20 13:41] miquel |
sermn_wiki:userpages:marta:servidor_web [2012/10/24 15:33] (current) miquel [Antic servidor web a rmn3] |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| L' | L' | ||
| - | ^ WAN Hostname / IP address | + | ^ WAN Hostname / IP address |
| - | | sermn.uab.cat / 158.109.58.175 | + | | sermn.uab.cat / 158.109.58.175 |
| - | | oldmrui.uab.cat / 158.109.58.236 | + | | oldmrui.uab.cat / 158.109.58.236 |
| Al tallafocs s'han definit filtres que permenten el tràfic entre les adreces equivalents de la taula anterior, | Al tallafocs s'han definit filtres que permenten el tràfic entre les adreces equivalents de la taula anterior, | ||
| + | |||
| + | ===== Configuració de la xarxa ===== | ||
| + | |||
| + | Aquesta és la configuració actual del servidor, | ||
| + | |||
| + | ==== Programes de configuració (semi)automàtica ==== | ||
| + | |||
| + | La configuració del servidor és estàtica, no canvia habitualment per tal d' | ||
| + | * resolvconf | ||
| + | * network-manager | ||
| + | |||
| + | ==== Fitxer: / | ||
| + | |||
| + | Comentar l' | ||
| + | |||
| + | < | ||
| + | # This file was automatically generated by the / | ||
| + | # program run by the persistent-net-generator.rules rules file. | ||
| + | # | ||
| + | # You can modify it, as long as you keep each rule on a single line. | ||
| + | |||
| + | # PCI device 0x14e4: | ||
| + | SUBSYSTEM==" | ||
| + | |||
| + | # PCI device 0x10ec: | ||
| + | # SUBSYSTEM==" | ||
| + | </ | ||
| + | |||
| + | ==== Fitxer: / | ||
| + | |||
| + | < | ||
| + | # This file describes the network interfaces available on your system | ||
| + | # and how to activate them. For more information, | ||
| + | |||
| + | # The loopback network interface | ||
| + | auto lo | ||
| + | iface lo inet loopback | ||
| + | |||
| + | # The primary network interface | ||
| + | |||
| + | # allow-hotplug eth0 | ||
| + | # replace allow-hotplug eth0 with auto eth0; otherwise restarting | ||
| + | # the network doesn' | ||
| + | |||
| + | auto eth0 eth0:1 | ||
| + | |||
| + | iface eth0 inet static | ||
| + | address 192.168.2.2 | ||
| + | netmask 255.255.255.0 | ||
| + | network 192.168.2.0 | ||
| + | broadcast 192.168.2.255 | ||
| + | gateway 192.168.2.1 | ||
| + | ## dns-* options are implemented by the resolvconf package, if installed | ||
| + | dns-nameservers 192.168.2.1 | ||
| + | dns-search sermn.net | ||
| + | |||
| + | # Another IP address at the same NIC. Intended for the MRUI server. | ||
| + | iface eth0:1 inet static | ||
| + | address 192.168.2.129 | ||
| + | netmask 255.255.255.0 | ||
| + | network 192.168.2.0 | ||
| + | # broadcast 192.168.2.255 | ||
| + | # gateway 192.168.2.1 | ||
| + | ## dns-* options are implemented by the resolvconf package, if installed | ||
| + | dns-nameservers 192.168.2.1 | ||
| + | dns-search sermn.net | ||
| + | </ | ||
| + | |||
| + | ==== Configuració de les interfícies de xarxa ==== | ||
| + | |||
| + | Aquesta és la configuració de les interfícies de xarxa que obtenim amb els fitxers de configuració de més amunt, | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | Kernel Interface table | ||
| + | eth0 Link encap: | ||
| + | inet addr: | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING MULTICAST | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | Interrupt: | ||
| + | |||
| + | eth0: | ||
| + | inet addr: | ||
| + | UP BROADCAST RUNNING MULTICAST | ||
| + | Interrupt: | ||
| + | |||
| + | lo Link encap:Local Loopback | ||
| + | inet addr: | ||
| + | inet6 addr: ::1/128 Scope:Host | ||
| + | UP LOOPBACK RUNNING | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | </ | ||
| + | |||
| + | ==== Taula de rutes ==== | ||
| + | |||
| + | Aquesta és la taula de rutes que obtenim amb els fitxers de configuració de més amunt, | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | Kernel IP routing table | ||
| + | Destination | ||
| + | 192.168.2.0 | ||
| + | 0.0.0.0 | ||
| + | </ | ||
| + | |||
| ===== Actualitzant a Apache 2 ===== | ===== Actualitzant a Apache 2 ===== | ||
| Line 91: | Line 203: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | |||
| + | ===== Securing Apache ===== | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | ===== Antic servidor web a rmn3 ===== | ||
| + | |||
| + | * [[.: | ||
| + | |||
| + | He modificat la configuració del servidor web per tal que les peticions a " | ||
| + | |||
| + | Per això, seguint les instruccions a, | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | he afegit les següents instruccions, | ||
| + | |||
| + | <code http> | ||
| + | NameVirtualHost 192.168.2.2: | ||
| + | |||
| + | < | ||
| + | ServerAdmin webmaster@localhost | ||
| + | |||
| + | ServerName rmn3.uab.cat | ||
| + | ServerAlias rmn3.uab.es | ||
| + | ServerAlias rmn3 | ||
| + | |||
| + | Redirect 301 / http:// | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerAdmin webmaster@localhost | ||
| + | |||
| + | # ServerName sermnserver.sermn.net | ||
| + | # ServerAlias sermnserver | ||
| + | |||
| + | ServerName sermn.uab.cat | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | al fitxer // | ||
| + | |||
| + | | {{: | ||
| + | |||
| + | Alternativament, | ||
| + | |||
| + | <code http> | ||
| + | HTTP/1.1 301 Moved Permanently => | ||
| + | Date => Wed, 24 Oct 2012 13:20:01 GMT | ||
| + | Server => Apache/ | ||
| + | Location => http:// | ||
| + | Vary => Accept-Encoding | ||
| + | Content-Length => 307 | ||
| + | Connection => close | ||
| + | Content-Type => text/html; charset=iso-8859-1 | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Comprovar el rànquing ===== | ||
| + | |||
| + | Per comprovar el rànquing del lloc web es poden fer servir les //Webmaster tools// a Google o altres serveis com, | ||
| + | * [[http:// | ||
| + | |||