User Tools

Site Tools


sermn_wiki:userpages:marta:servidor_web

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
sermn_wiki:userpages:marta:servidor_web [2011/04/26 18:05]
miquel
sermn_wiki:userpages:marta:servidor_web [2012/10/24 15:29]
miquel [Antic servidor web a rmn3]
Line 85: Line 85:
  
 <code> <code>
-# /bin/netstat -inve+# /bin/netstat -ie
 Kernel Interface table Kernel Interface table
 eth0      Link encap:Ethernet  HWaddr 00:25:b3:b8:73:a3   eth0      Link encap:Ethernet  HWaddr 00:25:b3:b8:73:a3  
Line 215: Line 215:
  
   * [[.:transferint_fitxers_de_rmn3_a_sermn | Transferint fitxers de rmn3 a sermn]]   * [[.:transferint_fitxers_de_rmn3_a_sermn | Transferint fitxers de rmn3 a sermn]]
 +
 +He modificat la configuració del servidor web per tal que les peticions a "rmn3.uab.cat/es" siguin adreçades a "sermn.uab.cat" fent servir el [[wp>URL_redirection | redireccionament d'adreces URL]] i retornant el codi de resposta [[wp>HTTP_301]] per tal que els serveis d'indexació i cerca de pàgines gestionin la transició de forma suau i les nostres pàgines no perdin el seu rànquing actual.
 +
 +Per això, seguint les instruccions a,
 +  * [[http://www.askdavetaylor.com/how_do_i_add_a_301_redirect_to_my_apache_httpdconf.html | How do I add a 301 redirect to my Apache httpd.conf?]]
 +  * [[http://www.mcanerin.com/EN/articles/301-redirect-apache.asp | Apache Redirects for SEOs]]
 +  * [[http://www.yolinux.com/TUTORIALS/ApacheRedirect.html | Apache Web Server Configuration for Web Site Redirection]]
 +  * [[http://www.submitawebsite.com/blog/2009/07/301-redirects-for-apache-servers-linux.html | 301 Redirects for Apache Servers – Linux 301 Redirect Advice]]
 +  * [[http://www.bestrank.com/blog/how-to-301-redirect-your-urls | How to 301 Redirect your URL’s]]
 +  * [[http://www.internetmarketingninjas.com/blog/search-engine-optimization/301-redirects | The Ultimate How-To Guide on 301 Redirects]]
 +
 +he afegit les següents instruccions,
 +
 +<code http>
 +NameVirtualHost 192.168.2.2:80
 +
 +<VirtualHost 192.168.2.2:80>
 + ServerAdmin webmaster@localhost
 +
 + ServerName rmn3.uab.cat
 + ServerAlias rmn3.uab.es
 + ServerAlias rmn3
 +
 + Redirect 301 / http://sermn.uab.cat/
 +</VirtualHost>
 +
 +<VirtualHost 192.168.2.2:80>
 + ServerAdmin webmaster@localhost
 +
 + # ServerName sermnserver.sermn.net
 + # ServerAlias sermnserver
 +
 + ServerName sermn.uab.cat
 + ...
 +</code>
 +
 +al fitxer //~apache2/sites-available/sermn.uab.cat// per definir un nou servidor virtual associat al hostname "rmn3.uab.cat" i als seus àlies "rmn3.uab.es" i "rmn3". Després de comprovar la configuració amb ''apache2ctl configtest,'' l'he reiniciat amb la comanda ''apache2clt graceful'' i he comprovat el redireccionament i, amb l'extensió //Redirect Path 0.6.3// del Google Chrome, he verificat que tornés el codi HTTP correcte
 +
 +| {{:sermn_wiki:userpages:marta:apache2:rmn3.uab.cat_-_redirect_http_301.png?200 |}} | {{:sermn_wiki:userpages:marta:apache2:rmn3.uab.es_-_redirect_http_301.png?200 |}} | {{:sermn_wiki:userpages:marta:apache2:rmn3_-_redirect_http_301.png?200 |}} |
 +
 +Alternativament, es poden fer servir els llocs esmentats a [[http://www.submitawebsite.com/blog/2009/07/how-to-verify-301-redirect.html | How to verify a 301 redirect]] per comprovar que el redireccionament funcioni correctament. Per exemple, la verificació de //rmn3.uab.cat// a [[http://www.webconfs.com/http-header-check.php | Web Tools : HTTP / HTTPS Header Check]] torna la següent capçalera HTTP,
 +
 +<code http>
 +HTTP/1.1 301 Moved Permanently =>
 +Date => Wed, 24 Oct 2012 13:20:01 GMT
 +Server => Apache/2.2.16 (Debian)
 +Location => http://sermn.uab.cat/
 +Vary => Accept-Encoding
 +Content-Length => 307
 +Connection => close
 +Content-Type => text/html; charset=iso-8859-1
 +</code>
 +
 +
  
sermn_wiki/userpages/marta/servidor_web.txt · Last modified: 2012/10/24 15:33 by miquel