website rev 272

pt: handbook - add translated page (Thanks Alice Ayanami)
author Claudinei Pereira <claudinei@ensinoemrede.com>
date Sun Feb 01 21:19:29 2009 +0000 (2009-02-01)
parents 0764e5183b75
children b1231c7351a4
files pt/doc/handbook/web-server.html
line diff
     1.1 --- a/pt/doc/handbook/web-server.html	Sun Feb 01 19:29:32 2009 +0000
     1.2 +++ b/pt/doc/handbook/web-server.html	Sun Feb 01 21:19:29 2009 +0000
     1.3 @@ -1,10 +1,10 @@
     1.4  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     1.5  	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.6 -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     1.7 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt" lang="pt">
     1.8  <head>
     1.9 -    <title>SliTaz Handbook (en) - LightTPD web server</title>    
    1.10 +    <title>Manual SliTaz (pt) - Servidor de Internet LightTPD</title>    
    1.11      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    1.12 -    <meta name="description" content="slitaz English handbook" />
    1.13 +    <meta name="description" content="slitaz portuguese handbook" />
    1.14      <meta name="expires" content="never" />
    1.15      <meta name="modified" content="2008-07-18 07:00:00" />
    1.16      <meta name="publisher" content="www.slitaz.org" />
    1.17 @@ -18,97 +18,102 @@
    1.18  <div id="header">
    1.19  <div id="quicknav" align="right">
    1.20      <a name="top"></a>
    1.21 -    <a href="chroot-env.html">Chroot Environment</a> |
    1.22 -    <a href="index.html">Table of contents</a>
    1.23 +    <a href="chroot-env.html">Ambiente Chroot</a> |
    1.24 +    <a href="index.html">Conteúdo</a>
    1.25  </div>
    1.26 -<h1><font color="#3e1220">SliTaz Handbook (en)</font></h1>
    1.27 +<h1><font color="#3e1220">Manual SliTaz (pt)</font></h1>
    1.28  </div>
    1.29  
    1.30  <!-- Content. -->
    1.31  <div id="content">
    1.32  <div class="content-right"></div>
    1.33  
    1.34 -<h2><font color="#df8f06">LightTPD Web Server</font></h2>
    1.35 +<h2><font color="#df8f06">Servidor de Internet LightTPD</font></h2>
    1.36  
    1.37  <ul>
    1.38 -	<li><a href="#about">About LightTPD.</a></li>
    1.39 -	<li><a href="#var-www">/var/www</a> - Root directory of documents.</li>
    1.40 -	<li><a href="#Public">~/Public</a> - Public directory of users.</li>
    1.41 -	<li><a href="#config">lighttpd.conf</a> - LightTPD Configuration File.</li>
    1.42 -	<li><a href="#start-stop-restart">Start, stop, restart the server.</a></li>
    1.43 -	<li><a href="#cgi-perl">Scripts CGI and Perl</a> - CGI scripts using Perl.</li>
    1.44 -	<li><a href="#cgi-python">Scripts CGI and Python</a> - CGI scripts using Python.</li>
    1.45 -	<li><a href="#auth">Authentication</a> - Protect directories using username and password.</li>
    1.46 +	<li><a href="#about">Sobre o LightTPD.</a></li>
    1.47 +	<li><a href="#var-www">/var/www</a> - Diretório raiz de documentos.</li>
    1.48 +	<li><a href="#Public">~/Public</a> - Diretório público de usuários.</li>
    1.49 +	<li><a href="#config">lighttpd.conf</a> - Arquivo de Configuração do LightTPD.</li>
    1.50 +	<li><a href="#start-stop-restart">Inicie, pare e reinicie o servidor.</a></li>
    1.51 +	<li><a href="#cgi-perl">Scripts CGI e Perl</a> - Scripts CGI usando Perl.</li>
    1.52 +	<li><a href="#cgi-python">Scripts CGI e Python</a> - Scripts CGI usando Python.</li>
    1.53 +	<li><a href="#auth">Autenticação</a> - Proteção para diretórios.</li>
    1.54  </ul>
    1.55  
    1.56  <a name="about"></a>
    1.57 -<h3>About LightTPD</h3>
    1.58 +<h3>Sobre o LightTPD</h3>
    1.59  <p>
    1.60 -This chapter describes the configuration and use of the LightTPD web server. It's a fast, secure, flexible HTTP 
    1.61 -server, using a small memory footprint. It enables intelligent management of the cpu load and offers
    1.62 -FastCGI support, CGI, Auth, Output compression and the rewriting of URLs etc. LightTPD is a cheap way to host your 
    1.63 -own site on an old machine.
    1.64 +Este capítulo descreve a configuração e uso do servidor de internet LightTPD. 
    1.65 +É um servidor de HTTP rápido, seguro, flexível e que consome pouca memória RAM. 
    1.66 +Habilita uma administração inteligente dos recursos da cpu e oferece suporte a 
    1.67 +FastCGI, CGI, Auth, compressão de Output, reescritura de URLs, etc. O LightTPD é
    1.68 +um modo barato para hospedar seu próprio site em uma máquina antiga. 
    1.69  </p>
    1.70  <p>
    1.71 -On SliTaz the server is automatically launched at system startup and is preconfigured with PHP. The root
    1.72 -of the documents served by default are in <code>/var/www</code>, this contains the default page <code>index.html</code>,
    1.73 -images are stored in the <code>images/</code> directory.
    1.74 -LightTPD website: <a href="http://www.lighttpd.net/">http://www.lighttpd.net/</a>
    1.75 +No SliTaz o servidor é lançado automaticamente na inicialização do sistema e é 
    1.76 +pré-configurado com PHP. A raiz dos documentos por padrão está em 
    1.77 +<code>/var/www</code>, contendo a página padrão <code>index.html</code>.
    1.78 +Imagens são armazenadas no diretório <code>images/</code>. Website do LightTPD: 
    1.79 +<a href="http://www.lighttpd.net/">http://www.lighttpd.net/</a>   
    1.80  </p>
    1.81  <a name="var-www"></a>
    1.82 -<h3>/var/www - Root directory of documents</h3>
    1.83 +<h3>/var/www - Diretório raiz de documentos</h3>
    1.84  <p>
    1.85 -The /var/www folder is the <em>root</em> directory of documents - you can access this via the URL
    1.86 -<a href="http://localhost/">http://localhost/</a>. If you want to host a site, you can save all your documents
    1.87 -in here. If you want to host multiple sites, you'll need to create virtual hosts. Note you can also check the 
    1.88 -<a href="http://localhost/server-status">http://localhost/server-status</a>. 
    1.89 -
    1.90 +A pasta /var/www é o diretório <em>raiz</em> de documentos - você pode ter acesso 
    1.91 +a ela pela URL <a href="http://localhost/">http://localhost/</a>. Se você quiser 
    1.92 +hospedar um site, você pode salvar todos seus documentos aqui. Se você quiser 
    1.93 +hospedar múltiplos sites, você precisará criar os hosts virtuais. Note que você 
    1.94 +também pode conferir o <a href="http://localhost/server-status">http://localhost/server-status</a>.   
    1.95  </p>
    1.96  <a name="Public"></a>
    1.97 -<h3>~/Public - Public directory of users</h3>
    1.98 +<h3>~/Public - Diretório público de usuários </h3>
    1.99  <p>
   1.100 -SliTaz provides the users of the system a public space to place documents, HTML in general. 
   1.101 -This directory is named Public and must be within the root of your user space, such as /home/hacker/Public.
   1.102 -To create this directory use the mkdir command:
   1.103 +O SliTaz provê aos usuários do sistema um espaço público para colocar documentos,
   1.104 +geralmente HTML. Este diretório chama-se Public e deve estar dentro da raiz de seu 
   1.105 +espaço de usuário, como por exemplo /home/hacker/Public. Para criar este diretório 
   1.106 +use o comando mkdir:   
   1.107  </p>
   1.108  <pre> $ mkdir ~/Public
   1.109  </pre>
   1.110  <p>
   1.111 -You can then have access via the URL: 
   1.112 -<a href="http://localhost/%7Ehacker/">http://localhost/~hacker/</a>. You can also use the machine name or IP 
   1.113 -address if you connect from another computer.
   1.114 +Você pode ter acesso então pela URL: 
   1.115 +<a href="http://localhost/%7Ehacker/">http://localhost/~hacker/</a>. Você também 
   1.116 +pode usar o nome de máquina ou o endereço IP se conectar de outro computador. 
   1.117  </p>
   1.118  <a name="config"></a>
   1.119 -<h3>/etc/lighttpd/lighttpd.conf - LightTPD configuration file</h3>
   1.120 +<h3>/etc/lighttpd/lighttpd.conf - arquivo de configuração do LightTPD</h3>
   1.121  <p>
   1.122 -The main configuration file for LightTPD (<code>lighttpd.conf</code>) is located in /etc/lighttpd/. This file provided by 
   1.123 -SliTaz is self-explanatory, just browse. You can find other examples on the LightTPD website. On
   1.124 -SliTaz you'll also find a <code>vhosts.conf</code> file for the configuration of any virtual hosts (hosting 
   1.125 -several sites on the same server).
   1.126 +O arquivo de configuração principal do LightTPD (<code>lighttpd.conf</code>) é 
   1.127 +encontrado em /etc/lighttpd/. Este arquivo provido por SliTaz é auto-explicativo,
   1.128 +leia-o para maiores informações. Você pode achar outros exemplos no website do 
   1.129 +LightTPD. No SliTaz você achará também o arquivo <code>vhosts.conf</code> para a
   1.130 +configuração de qualquer host virtual (hospedar vários sites no mesmo servidor).   
   1.131  </p>
   1.132  <a name="start-stop-restart"></a>
   1.133 -<h3>Start, stop, restart the web server</h3>
   1.134 +<h3>Inicie, pare, reinicie o servidor de internet</h3>
   1.135  <p>
   1.136 -By default, SliTaz starts the server automatically at boot, to prevent this you need to remove
   1.137 -<code>lighttpd</code> from the variable RUN_DAEMONS located in the system file
   1.138 -<code>/etc/rcS.conf</code>. To start, stop or restart the server, you can use the commands:
   1.139 -<code>/etc/init.d/lighttpd [start|stop|restart]</code>. Example to restart the server after
   1.140 -changing the configuration file:
   1.141 +Por padrão o SliTaz inicia o servidor automaticamente no boot, para prevenir isto 
   1.142 +você precisa remover o <code>lighttpd</code> da variável RUN_DAEMONS localizado 
   1.143 +no arquivo de sistema <code>/etc/rcS.conf</code>. Para iniciar, parar ou reiniciar 
   1.144 +o servidor você pode usar os comandos: 
   1.145 +<code>/etc/init.d/lighttpd [binstart|stop|restart]</code>. Exemplo para reiniciar
   1.146 +o servidor após mudar o arquivo de configuração: 
   1.147  </p>
   1.148  <pre> # /etc/init.d/lighttpd restart
   1.149  </pre>
   1.150 -
   1.151  <a name="cgi-perl"></a>
   1.152 -<h3>CGI scripts using Perl</h3>
   1.153 +<h3>Scripts CGI usando Perl </h3>
   1.154  <p>
   1.155 -To configure the LightTPD server to locate the path of the <code>perl</code> binary and use CGI/Perl, you'll need to
   1.156 -install perl and modify the server configuration file. Example using Geany:
   1.157 +Para configurar o servidor de LightTPD para localizar o caminho do binário do 
   1.158 +<code>perl</code> e usar CGI/Perl, você precisará instalar o perl e modificar o 
   1.159 +arquivo de configuração de servidor. Exemplo usando o Geany: 
   1.160  </p>
   1.161  <pre> # tazpkg get-install perl
   1.162   # geany /etc/lighttpd/lighttpd.conf &amp;
   1.163  </pre>
   1.164 -<pre class="script"># CGI module. You can install Perl and assign .pl and .cgi scripts
   1.165 -# to /usr/bin/perl
   1.166 +<pre class="script"># CGI module. Você pode instalar o Perl e atribuir scripts .pl e .cgi
   1.167 +# para o executável /usr/bin/perl
   1.168  $HTTP["url"] =~ "/cgi-bin/" {
   1.169    cgi.assign = (
   1.170      ".sh" =&gt; "/bin/sh",
   1.171 @@ -117,18 +122,18 @@
   1.172    )
   1.173  }
   1.174  </pre>
   1.175 -
   1.176  <a name="cgi-python"></a>
   1.177 -<h3>CGI scripts using Python</h3>
   1.178 +<h3>Scripts CGI que usam Python</h3>
   1.179  <p>
   1.180 -To configure the LightTPD server to locate the path of the <code>python</code> binary and use CGI/Python, you'll need to
   1.181 -to install python and modify the server configuration file. Example using Geany:
   1.182 +Para configurar o servidor LightTPD para localizar o caminho do binário 
   1.183 +<code>python</code> e usar CGI/Python, você precisará instalar o python e 
   1.184 +modificar o arquivo de configuração do servidor. Exemplo usando o Geany:   
   1.185  </p>
   1.186  <pre> # tazpkg get-install python
   1.187   # geany /etc/lighttpd/lighttpd.conf &amp;
   1.188  </pre>
   1.189 -<pre class="script"># CGI module. You can install Python and assign .py and .cgi scripts
   1.190 -# to /usr/bin/python
   1.191 +<pre class="script"># CGI module. Você pode instalar o Python e atribuir scripts .py e .cgi
   1.192 +# para o executável /usr/bin/python
   1.193  $HTTP["url"] =~ "/cgi-bin/" {
   1.194    cgi.assign = (
   1.195      ".sh" =&gt; "/bin/sh",
   1.196 @@ -138,20 +143,20 @@
   1.197  }
   1.198  </pre>
   1.199  <p>
   1.200 -For the changes to be taken into effect and to use your first CGI scripts on SliTaz, just
   1.201 -restart the LightTPD server:
   1.202 +Para as mudanças fazerem efeito e para usar os seus primeiros scripts de CGI no
   1.203 +SliTaz, apenas reinicie o servidor LightTPD:  
   1.204  </p>
   1.205  <pre> # /etc/init.d/lighttpd restart
   1.206  </pre>
   1.207 -
   1.208  <a name="auth"></a>
   1.209 -<h3>Authentication - Protection for the directories</h3>
   1.210 +<h3>Autenticação - Proteção para os diretórios</h3>
   1.211  <p>
   1.212 -LightTPD provides authentication modules that can for example, protect a directory. The server 
   1.213 -offers several authentication methods, but we will begin by using the basic method without encrypting any
   1.214 -passwords. In order to be able to use the module <code>mod_auth</code>, you must install the lighttpd-modules
   1.215 -package (<code>tazpkg get-install lighttpd-modules</code>), once installed <code>mod_auth</code>
   1.216 -must be added to the list of modules:
   1.217 +LightTPD provê módulos de autenticação que podem, por exemplo, proteger um 
   1.218 +diretório. O servidor oferece vários métodos de autenticação, mas nós começaremos
   1.219 +usando o método básico sem codificar qualquer password. Para poder usar o módulo 
   1.220 +<code>mod_auth</code> você tem que instalar o pacote lighttpd-modules 
   1.221 +(<code>tazpkg get-install lighttpd-modules</code>). Uma vez instalado, o 
   1.222 +<code>mod_auth</code> deve ser adicionado à lista de módulos:
   1.223  </p>
   1.224  <pre class="script"># Modules to load.
   1.225  # See /usr/lib/lighttpd for all available modules.
   1.226 @@ -163,10 +168,12 @@
   1.227  )
   1.228  </pre>
   1.229  <p>
   1.230 -Now you can configure the modules by specifying the debug level and method (<code>plain</code>) and the
   1.231 -path to the file containing a list of names using a protected password to access the directories. You must also 
   1.232 -define the directories that require authorization. In this example we'll protect the <code>admin/</code> directory
   1.233 -and authorize it's access to user hacker (<code>user=hacker</code>):
   1.234 +Agora você pode configurar os módulos especificando o nível de depuração (debug) 
   1.235 +e método (<code>plain</code>) e o caminho para o arquivo que contém uma lista de 
   1.236 +nomes usando uma password protegida para ter acesso aos diretórios. Você também 
   1.237 +tem que definir os diretórios que requerem autorização. Neste exemplo nós 
   1.238 +protegeremos o diretório <code>/admin</code> e autorizaremos o acesso para o 
   1.239 +usuário hacker (<code>user=hacker</code>):   
   1.240  </p>
   1.241  <pre class="script"># Authentication for protected directory.
   1.242  auth.debug = 2
   1.243 @@ -181,17 +188,20 @@
   1.244  )
   1.245  </pre>
   1.246  <p>
   1.247 -Finally, we now create the file containing the passwords, add a user and restart the server for testing.
   1.248 -The basic syntax for the file is <code>user:password</code>. You can create the file and add a user with the 
   1.249 -<code>echo</code> command or edit with your favorite text editor. To add <code>hacker:root</code>
   1.250 -to the password file <code>/etc/lighttpd/plain.passwd</code>:
   1.251 +Finalmente, nós vamos criar agora o arquivo que contém as passwords, adicionar 
   1.252 +um usuário e reiniciar o servidor para testar. A sintaxe básica para o arquivo 
   1.253 +é <code>user:password</code>. Você pode criar o arquivo e pode adicionar um 
   1.254 +usuário com o comando <code>echo</code> ou pode editar com seu editor de texto 
   1.255 +favorito. Para acrescentar <code>hacker:root</code> ao arquivo de passwords 
   1.256 +<code>/etc/lighttpd/plain.passwd</code>:  
   1.257  </p>
   1.258  <pre> # echo "hacker:root" &gt; /etc/lighttpd/plain.passwd
   1.259 - Or :
   1.260 + Ou :
   1.261   # nano /etc/lighttpd/plain.passwd
   1.262  </pre>
   1.263  <p>
   1.264 -To test the address: <strong>http://localhost/admin/</strong>, just restart the server:
   1.265 +Para testar o endereço: <strong>http://localhost/admin/</strong>, apenas reinicie
   1.266 +o servidor:
   1.267  </p>
   1.268  <pre> # /etc/init.d/lighttpd restart
   1.269  </pre>
   1.270 @@ -202,12 +212,12 @@
   1.271  <!-- Footer. -->
   1.272  <div id="footer">
   1.273  	<div class="footer-right"></div>
   1.274 -	<a href="#top">Top of the page</a> | 
   1.275 -	<a href="index.html">Table of contents</a>
   1.276 +	<a href="#top">Topo da Página</a> | 
   1.277 +	<a href="index.html">Conteúdo</a>
   1.278  </div>
   1.279  
   1.280  <div id="copy">
   1.281 -    Copyright © 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   1.282 +    Copyright © 2008 <a href="http://www.slitaz.org/pt/">SliTaz</a> -
   1.283      <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   1.284      Documentation is under
   1.285      <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>