<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TechnoBlog &#187; Lighttp</title>
	<atom:link href="http://www.technoblog.com.ar/index.php/category/servidor/web/lighttp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technoblog.com.ar</link>
	<description>Blog de tecnologia</description>
	<lastBuildDate>Sun, 30 Dec 2012 21:43:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Como crear VirtualHosts en Lighttpd (Ubuntu 9.10)</title>
		<link>http://www.technoblog.com.ar/index.php/2010/01/como-crear-virtualhosts-en-lighttpd-ubuntu-9-10/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.technoblog.com.ar/index.php/2010/01/como-crear-virtualhosts-en-lighttpd-ubuntu-9-10/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 16:46:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lighttp]]></category>

		<guid isPermaLink="false">http://www.technoblog.com.ar/?p=1664</guid>
		<description><![CDATA[Si necesitamos tener dos sitios web obviamente con dos dominios distintos en un mismo Servidor Lighttpd tenemos que recurrir a los VirtualHosts que justamente nos permiten hacer esto. Supongamos para este ejemplo que queremos usar los dominios www.prueba1.com y www.prueba2.com y su respectivos directorios /var/www/prueba1 y /var/www/prueba1. En primer lugar preparamos el entorno de prueba&#8230;<p><a href="http://www.technoblog.com.ar/index.php/2010/01/como-crear-virtualhosts-en-lighttpd-ubuntu-9-10/">Como crear VirtualHosts en Lighttpd (Ubuntu 9.10)</a> is a post from: <a href="http://www.technoblog.com.ar">TechnoBlog</a></p>
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.technoblog.com.ar/wp-content/uploads/2009/12/light_logo.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignleft size-thumbnail wp-image-1194" style="margin-left: 0px; margin-right: 15px; margin-top: 0px; margin-bottom: 15px;" title="light_logo" src="http://www.technoblog.com.ar/wp-content/uploads/2009/12/light_logo-150x150.png" alt="" width="150" height="150" /></a>Si necesitamos tener dos sitios web obviamente con dos dominios distintos en un mismo Servidor Lighttpd tenemos que recurrir a los VirtualHosts que justamente nos permiten hacer esto.</p>
<p style="text-align: justify;">Supongamos para este ejemplo que queremos usar los dominios www.prueba1.com y www.prueba2.com y su respectivos directorios /var/www/prueba1 y /var/www/prueba1.</p>
<p style="text-align: justify;">En primer lugar preparamos el entorno de prueba editando el archivo /etc/hosts y le agregamos las dos lineas que vemos a continuacion.</p>
<p style="text-align: justify;"><span id="more-1664"></span></p>
<blockquote style="text-align: justify;">
<h6>127.0.0.1               www.prueba1.com<br />
127.0.0.1               www.prueba2.com</h6>
</blockquote>
<p style="text-align: justify;">Con esto hacemos una resolución de nombres local en nuestro server (saltear esto si ya tenemos los dominios reales apuntando a nuestro server).</p>
<p style="text-align: justify;">En este momento si navegamos los dos dominios solo veremos la pagina default del Lighttpd que esta en /var/www como se ve en la imagen</p>
<p style="text-align: justify;"><a href="http://www.technoblog.com.ar/wp-content/uploads/2010/01/vh_lighttpd1.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-full wp-image-1665" title="vh_lighttpd1" src="http://www.technoblog.com.ar/wp-content/uploads/2010/01/vh_lighttpd1.png" alt="" width="577" height="426" /></a></p>
<p style="text-align: justify;">El siguiente paso es generar los archivos de los virtual host y para esto ejecutamos desde la consola (logueados como root o con sudo) los siguientes comandos.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">mkdir /var/www/prueba1</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">mkdir /var/www/prueba2</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">touch /var/www/prueba1/index.html</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">touch /var/www/prueba2/index.html</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">echo "Esto es prueba 1" &gt; /var/www/prueba1/index.html</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">echo "Esto es prueba 2" &gt; /var/www/prueba2/index.html</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">ln -s /etc/apache2/sites-available/prueba2 /etc/apache2/sites-enabled/prueba2</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 275px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: justify;">ln -s /etc/apache2/sites-available/prueba1 /etc/apache2/sites-enabled/prueba1</div>
<blockquote style="text-align: justify;">
<h6>mkdir /var/www/prueba1<br />
mkdir /var/www/prueba2<br />
touch /var/www/prueba1/index.html<br />
touch /var/www/prueba2/index.html<br />
echo "Esto es prueba 1" &gt; /var/www/prueba1/index.html<br />
echo "Esto es prueba 2" &gt; /var/www/prueba2/index.html<br />
mkdir /var/log/lighttpd/prueba1<br />
mkdir /var/log/lighttpd/prueba2</h6>
</blockquote>
<p style="text-align: justify;">Ahora editamos el archivo /etc/lighttpd/lighttpd.conf y le agregamos lo siguiente:</p>
<blockquote style="text-align: justify;">
<h6>$HTTP["host"] =~ "www.prueba2.com.ar" {<br />
server.document-root = "/var/www/prueba2"<br />
server.errorlog = "/var/log/lighttpd/prueba2/error.log"<br />
accesslog.filename = "/var/log/lighttpd/prueba2/access.log"<br />
}<br />
$HTTP["host"] =~ "www.prueba1.com.ar" {<br />
server.document-root = "/var/www/prueba1"<br />
server.errorlog = "/var/log/lighttpd/prueba2/error.log"<br />
accesslog.filename = "/var/log/lighttpd/prueba2/access.log"<br />
}</h6>
</blockquote>
<p><strong>server.document-root</strong>: Indica la ubicación de los archivos de este dominio<br />
<strong>server.errorlog</strong>: Nos permite especificar un archivo de log de error especial para este dominio en caso de no desearlo asi dejamos el default.<br />
<strong>accesslog.filename </strong>: Nos permite especificar un archivo de log de accesos especial para este dominio en caso de no desearlo asi dejamos el default.</p>
<p style="text-align: justify;">Reiniciamos lighttpd mediante el comando</p>
<blockquote style="text-align: justify;">
<h6>/etc/init.d/lighttpd restart</h6>
</blockquote>
<p style="text-align: justify;">Como vemos si ahora navegamos los dos dominios vemos sus respectivas paginas</p>
<p style="text-align: justify;"><a href="http://www.technoblog.com.ar/wp-content/uploads/2009/11/virtualhost2.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="size-full wp-image-990 alignnone" title="virtualhost2" src="http://www.technoblog.com.ar/wp-content/uploads/2009/11/virtualhost2.png" alt="virtualhost2" width="401" height="269" /></a></p>
<p style="text-align: justify;">Finalmente este es el momento de copiar los archivos de nuestros sitios a sus respectivos directorios</p>
<p style="text-align: justify;">Esperamos que les sea de utilidad y cualquier duda pueden aclararla a través de los comentarios</p>
<p><a href="http://www.technoblog.com.ar/index.php/2010/01/como-crear-virtualhosts-en-lighttpd-ubuntu-9-10/">Como crear VirtualHosts en Lighttpd (Ubuntu 9.10)</a> is a post from: <a href="http://www.technoblog.com.ar">TechnoBlog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.technoblog.com.ar/index.php/2010/01/como-crear-virtualhosts-en-lighttpd-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Como instalar Lighttpd+Mysql+PHP en Mandriva 2009</title>
		<link>http://www.technoblog.com.ar/index.php/2010/01/como-instalar-lighttpdmysqlphp-en-mandriva-2009/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.technoblog.com.ar/index.php/2010/01/como-instalar-lighttpdmysqlphp-en-mandriva-2009/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 18:07:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Lighttp]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://www.technoblog.com.ar/?p=1511</guid>
		<description><![CDATA[Hace unos días tuve que montar un servidor web con soporte de php y Mysql para poner un blog. La maquina no era muy buena así que en lugar de poner Apache como servidor Web me decidí a poner Lighttpd. Antes que nada una reseña de las principales características según sus creadores . Seguridad, rapidez, cumplimiento y flexibilidad son las principales ventajas de lighttpd . Con una pequeña&#8230;<p><a href="http://www.technoblog.com.ar/index.php/2010/01/como-instalar-lighttpdmysqlphp-en-mandriva-2009/">Como instalar Lighttpd+Mysql+PHP en Mandriva 2009</a> is a post from: <a href="http://www.technoblog.com.ar">TechnoBlog</a></p>
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.technoblog.com.ar/wp-content/uploads/2009/12/light_logo.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignleft size-thumbnail wp-image-1194" style="margin-left: 0px; margin-right: 10px; margin-top: 0px; margin-bottom: 10px;" title="light_logo" src="http://www.technoblog.com.ar/wp-content/uploads/2009/12/light_logo-150x150.png" alt="" width="120" height="120" /></a>Hace unos días tuve que montar un servidor web con soporte de php y Mysql para poner un blog. La maquina no era muy buena así que en lugar de poner Apache como servidor Web me decidí a poner Lighttpd.</p>
<p style="text-align: justify;"><span style="font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; line-height: 17px; font-size: 12px;">Antes que nada una reseña de las principales características según sus creadores .<em><strong> </strong></em><em>Seguridad, rapidez, cumplimiento y flexibilidad son las principales ventajas de lighttpd . Con una pequeña huella de memoria en comparación con otros servidores web , la gestión eficaz de la carga de la CPU, y un conjunto de funciones avanzadas (FastCGI, SCGI, Auth,compresión de salida, reescritura de URL y muchos más) lighttpd es la solución perfecta para cada servidor que está sufriendo problemas de  carga. Es Open Source y se distribuye  bajo la licencia BSD revisada</em>.</span></p>
<p style="text-align: justify;"><span style="font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; line-height: 17px; font-size: 12px;">Como siempre lo haremos desde la consola ya que es el medio que mas facilmente tenemos disponible ademas de su facilidad para el acceso remoto.</span></p>
<p style="text-align: justify;"><span style="font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; line-height: 17px; font-size: 12px;"><span id="more-1511"></span></span></p>
<p style="text-align: justify;">El proceso de instalación es distinto al del Apache  así que explicare aqui los pasos que realice para hacer la instalación</p>
<p style="text-align: justify;">Primero instalamos mysql con el siguiente comando</p>
<blockquote style="text-align: justify;">
<h6>urpmi mysql mysql-client</h6>
</blockquote>
<p style="text-align: justify;">una vez que se instala mysql tiene deshabilitado el uso en red asi que editaremos el archivo /etc/my.cnf  cambiando en donde dice</p>
<blockquote style="text-align: justify;">
<h6>skip-networking</h6>
</blockquote>
<p style="text-align: justify;">por</p>
<blockquote style="text-align: justify;">
<h6>#skip-networking</h6>
</blockquote>
<p style="text-align: justify;">el símbolo # le indica a mysql que la linea esta comentada así que la debe ignorar. Finalmente cambiamos la clave de root y arrancaremos mysql usando</p>
<blockquote style="text-align: justify;">
<h6>mysqladmin -u root password <nuestra_contraseña><br />
/etc/init.d/mysql start</h6>
</blockquote>
<p style="text-align: justify;">Instalamos y arrancamos Lighttpd usando:</p>
<blockquote style="text-align: justify;">
<h6>urpmi lighttpd<br />
/etc/init.d/lighttpd start</h6>
</blockquote>
<p style="text-align: justify;">Instalamos PHP usando:</p>
<blockquote style="text-align: justify;">
<h6>urpmi php-fcgi</h6>
</blockquote>
<p style="text-align: justify;">Editamos el archivo /etc/php.ini y modificaremos la clave cgi.fix_pathinfo para ponerla en  1</p>
<h6 style="text-align: justify;">
<blockquote><p>cgi.fix_pathinfo=1</p></blockquote>
</h6>
<p style="text-align: justify;">Luego editamos el archivo /etc/lighttpd/lighttpd.conf y tenemos que activar el modulo mod_fastcgi sacandole el símbolo de comentario a la linea correspondiente</p>
<blockquote style="text-align: justify;">
<h6>server.modules              = (<br />
"mod_rewrite",<br />
#                                            "mod_redirect",<br />
#                                            "mod_alias",<br />
"mod_access",<br />
#                                            "mod_cml",<br />
#                                            "mod_trigger_b4_dl",<br />
#                                            "mod_auth",<br />
#                                            "mod_status",<br />
#                                            "mod_setenv",<br />
"mod_fastcgi",<br />
#                                            "mod_proxy",<br />
#                                            "mod_simple_vhost",<br />
#                                            "mod_evhost",<br />
#                                            "mod_userdir",<br />
#                                            "mod_cgi",<br />
#                                            "mod_compress",<br />
#                                            "mod_ssi",<br />
#                                            "mod_usertrack",<br />
#                                            "mod_expire",<br />
#                                            "mod_secdownload",<br />
#                                            "mod_rrdtool",<br />
"mod_accesslog" )</h6>
</blockquote>
<p style="text-align: justify;">finalmente con figuraremos el modulo mod_fastcgi descomentando la sección que se ve a continuación</p>
<h6 style="text-align: justify;">
<blockquote>
<div id="_mcePaste">fastcgi.server             = ( ".php" =></div>
<div id="_mcePaste">( "localhost" =>(</div>
<div id="_mcePaste">"socket" => "/var/run/lighttpd/php-fastcgi.socket",</div>
<div id="_mcePaste">"bin-path" => "/usr/bin/php-fcgi"</div>
<div id="_mcePaste">)))</div>
</blockquote>
</h6>
<p style="text-align: justify;">Seguramente el directorio /var/run/lighttpd no existe así que lo creamos usando</p>
<blockquote style="text-align: justify;">
<h6>mkdir /var/run/lighttpd<br />
chown apache:apache /var/run/lighttpd</h6>
</blockquote>
<p style="text-align: justify;">Reiniciamos Lighttpd con</p>
<blockquote style="text-align: justify;">
<h6>/etc/init.d/lighttpd restart</h6>
</blockquote>
<p style="text-align: justify;">Para verificar que todo quedo bien instalado pondremos un archivo llamado <strong>info.php </strong>en la carpeta  <strong>/var/www/html </strong>con el siguiente contenido.</p>
<blockquote style="text-align: justify;">
<h6><?php<br />
phpinfo();<br />
?></h6>
</blockquote>
<h6 style="text-align: justify;"><span style="font-weight: normal; font-size: 13px;">Abrimos el navegador de internet y navegamos la URL <strong>http://direccion del server/info.php</strong> y deberiamos ver algo asi</span></h6>
<p><span style="font-weight: normal; font-size: 13px;"><a href="http://www.technoblog.com.ar/wp-content/uploads/2010/01/lighttpd1.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-full wp-image-1517" title="lighttpd1" src="http://www.technoblog.com.ar/wp-content/uploads/2010/01/lighttpd1.png" alt="" width="611" height="592" /></a></span></p>
<p>El ultimo paso que queda es instalar soporte de mysql para php usando</p>
<blockquote>
<h6>urpmi php-mysql</h6>
</blockquote>
<p style="text-align: justify;">Reiniciamos Lighttpd con</p>
<blockquote style="text-align: justify;">
<h6 style="font-size: 0.75em;">/etc/init.d/lighttpd restart</h6>
</blockquote>
<p>Volvemos a abrir el navegador de internet y navegamos la URL <strong>http://direccion del server/info.php</strong> y deberiamos ver en la parte media de la pantalla el modulo de mysql como se ve en la siguiente imagen</p>
<p><a href="http://www.technoblog.com.ar/wp-content/uploads/2010/01/lighttpd2.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignnone size-full wp-image-1518" title="lighttpd2" src="http://www.technoblog.com.ar/wp-content/uploads/2010/01/lighttpd2.png" alt="" width="611" height="592" /></a></p>
<p><a href="http://www.technoblog.com.ar/index.php/2010/01/como-instalar-lighttpdmysqlphp-en-mandriva-2009/">Como instalar Lighttpd+Mysql+PHP en Mandriva 2009</a> is a post from: <a href="http://www.technoblog.com.ar">TechnoBlog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.technoblog.com.ar/index.php/2010/01/como-instalar-lighttpdmysqlphp-en-mandriva-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
