# HG changeset patch # User Claudinei Pereira # Date 1233523169 0 # Node ID e21dcdd56671a9f9e3bc6fa50ce3b796743112aa # Parent 0764e5183b752d10a378d403e3357ecd31978816 pt: handbook - add translated page (Thanks Alice Ayanami) diff -r 0764e5183b75 -r e21dcdd56671 pt/doc/handbook/web-server.html --- a/pt/doc/handbook/web-server.html Sun Feb 01 19:29:32 2009 +0000 +++ b/pt/doc/handbook/web-server.html Sun Feb 01 21:19:29 2009 +0000 @@ -1,10 +1,10 @@ - + - SliTaz Handbook (en) - LightTPD web server + Manual SliTaz (pt) - Servidor de Internet LightTPD - + @@ -18,97 +18,102 @@
-

LightTPD Web Server

+

Servidor de Internet LightTPD

-

About LightTPD

+

Sobre o LightTPD

-This chapter describes the configuration and use of the LightTPD web server. It's a fast, secure, flexible HTTP -server, using a small memory footprint. It enables intelligent management of the cpu load and offers -FastCGI support, CGI, Auth, Output compression and the rewriting of URLs etc. LightTPD is a cheap way to host your -own site on an old machine. +Este capítulo descreve a configuração e uso do servidor de internet LightTPD. +É um servidor de HTTP rápido, seguro, flexível e que consome pouca memória RAM. +Habilita uma administração inteligente dos recursos da cpu e oferece suporte a +FastCGI, CGI, Auth, compressão de Output, reescritura de URLs, etc. O LightTPD é +um modo barato para hospedar seu próprio site em uma máquina antiga.

-On SliTaz the server is automatically launched at system startup and is preconfigured with PHP. The root -of the documents served by default are in /var/www, this contains the default page index.html, -images are stored in the images/ directory. -LightTPD website: http://www.lighttpd.net/ +No SliTaz o servidor é lançado automaticamente na inicialização do sistema e é +pré-configurado com PHP. A raiz dos documentos por padrão está em +/var/www, contendo a página padrão index.html. +Imagens são armazenadas no diretório images/. Website do LightTPD: +http://www.lighttpd.net/

-

/var/www - Root directory of documents

+

/var/www - Diretório raiz de documentos

-The /var/www folder is the root directory of documents - you can access this via the URL -http://localhost/. If you want to host a site, you can save all your documents -in here. If you want to host multiple sites, you'll need to create virtual hosts. Note you can also check the -http://localhost/server-status. - +A pasta /var/www é o diretório raiz de documentos - você pode ter acesso +a ela pela URL http://localhost/. Se você quiser +hospedar um site, você pode salvar todos seus documentos aqui. Se você quiser +hospedar múltiplos sites, você precisará criar os hosts virtuais. Note que você +também pode conferir o http://localhost/server-status.

-

~/Public - Public directory of users

+

~/Public - Diretório público de usuários

-SliTaz provides the users of the system a public space to place documents, HTML in general. -This directory is named Public and must be within the root of your user space, such as /home/hacker/Public. -To create this directory use the mkdir command: +O SliTaz provê aos usuários do sistema um espaço público para colocar documentos, +geralmente HTML. Este diretório chama-se Public e deve estar dentro da raiz de seu +espaço de usuário, como por exemplo /home/hacker/Public. Para criar este diretório +use o comando mkdir:

 $ mkdir ~/Public
 

-You can then have access via the URL: -http://localhost/~hacker/. You can also use the machine name or IP -address if you connect from another computer. +Você pode ter acesso então pela URL: +http://localhost/~hacker/. Você também +pode usar o nome de máquina ou o endereço IP se conectar de outro computador.

-

/etc/lighttpd/lighttpd.conf - LightTPD configuration file

+

/etc/lighttpd/lighttpd.conf - arquivo de configuração do LightTPD

-The main configuration file for LightTPD (lighttpd.conf) is located in /etc/lighttpd/. This file provided by -SliTaz is self-explanatory, just browse. You can find other examples on the LightTPD website. On -SliTaz you'll also find a vhosts.conf file for the configuration of any virtual hosts (hosting -several sites on the same server). +O arquivo de configuração principal do LightTPD (lighttpd.conf) é +encontrado em /etc/lighttpd/. Este arquivo provido por SliTaz é auto-explicativo, +leia-o para maiores informações. Você pode achar outros exemplos no website do +LightTPD. No SliTaz você achará também o arquivo vhosts.conf para a +configuração de qualquer host virtual (hospedar vários sites no mesmo servidor).

-

Start, stop, restart the web server

+

Inicie, pare, reinicie o servidor de internet

-By default, SliTaz starts the server automatically at boot, to prevent this you need to remove -lighttpd from the variable RUN_DAEMONS located in the system file -/etc/rcS.conf. To start, stop or restart the server, you can use the commands: -/etc/init.d/lighttpd [start|stop|restart]. Example to restart the server after -changing the configuration file: +Por padrão o SliTaz inicia o servidor automaticamente no boot, para prevenir isto +você precisa remover o lighttpd da variável RUN_DAEMONS localizado +no arquivo de sistema /etc/rcS.conf. Para iniciar, parar ou reiniciar +o servidor você pode usar os comandos: +/etc/init.d/lighttpd [binstart|stop|restart]. Exemplo para reiniciar +o servidor após mudar o arquivo de configuração:

 # /etc/init.d/lighttpd restart
 
- -

CGI scripts using Perl

+

Scripts CGI usando Perl

-To configure the LightTPD server to locate the path of the perl binary and use CGI/Perl, you'll need to -install perl and modify the server configuration file. Example using Geany: +Para configurar o servidor de LightTPD para localizar o caminho do binário do +perl e usar CGI/Perl, você precisará instalar o perl e modificar o +arquivo de configuração de servidor. Exemplo usando o Geany:

 # tazpkg get-install perl
  # geany /etc/lighttpd/lighttpd.conf &
 
-
# CGI module. You can install Perl and assign .pl and .cgi scripts
-# to /usr/bin/perl
+
# CGI module. Você pode instalar o Perl e atribuir scripts .pl e .cgi
+# para o executável /usr/bin/perl
 $HTTP["url"] =~ "/cgi-bin/" {
   cgi.assign = (
     ".sh" => "/bin/sh",
@@ -117,18 +122,18 @@
   )
 }
 
- -

CGI scripts using Python

+

Scripts CGI que usam Python

-To configure the LightTPD server to locate the path of the python binary and use CGI/Python, you'll need to -to install python and modify the server configuration file. Example using Geany: +Para configurar o servidor LightTPD para localizar o caminho do binário +python e usar CGI/Python, você precisará instalar o python e +modificar o arquivo de configuração do servidor. Exemplo usando o Geany:

 # tazpkg get-install python
  # geany /etc/lighttpd/lighttpd.conf &
 
-
# CGI module. You can install Python and assign .py and .cgi scripts
-# to /usr/bin/python
+
# CGI module. Você pode instalar o Python e atribuir scripts .py e .cgi
+# para o executável /usr/bin/python
 $HTTP["url"] =~ "/cgi-bin/" {
   cgi.assign = (
     ".sh" => "/bin/sh",
@@ -138,20 +143,20 @@
 }
 

-For the changes to be taken into effect and to use your first CGI scripts on SliTaz, just -restart the LightTPD server: +Para as mudanças fazerem efeito e para usar os seus primeiros scripts de CGI no +SliTaz, apenas reinicie o servidor LightTPD:

 # /etc/init.d/lighttpd restart
 
- -

Authentication - Protection for the directories

+

Autenticação - Proteção para os diretórios

-LightTPD provides authentication modules that can for example, protect a directory. The server -offers several authentication methods, but we will begin by using the basic method without encrypting any -passwords. In order to be able to use the module mod_auth, you must install the lighttpd-modules -package (tazpkg get-install lighttpd-modules), once installed mod_auth -must be added to the list of modules: +LightTPD provê módulos de autenticação que podem, por exemplo, proteger um +diretório. O servidor oferece vários métodos de autenticação, mas nós começaremos +usando o método básico sem codificar qualquer password. Para poder usar o módulo +mod_auth você tem que instalar o pacote lighttpd-modules +(tazpkg get-install lighttpd-modules). Uma vez instalado, o +mod_auth deve ser adicionado à lista de módulos:

# Modules to load.
 # See /usr/lib/lighttpd for all available modules.
@@ -163,10 +168,12 @@
 )
 

-Now you can configure the modules by specifying the debug level and method (plain) and the -path to the file containing a list of names using a protected password to access the directories. You must also -define the directories that require authorization. In this example we'll protect the admin/ directory -and authorize it's access to user hacker (user=hacker): +Agora você pode configurar os módulos especificando o nível de depuração (debug) +e método (plain) e o caminho para o arquivo que contém uma lista de +nomes usando uma password protegida para ter acesso aos diretórios. Você também +tem que definir os diretórios que requerem autorização. Neste exemplo nós +protegeremos o diretório /admin e autorizaremos o acesso para o +usuário hacker (user=hacker):

# Authentication for protected directory.
 auth.debug = 2
@@ -181,17 +188,20 @@
 )
 

-Finally, we now create the file containing the passwords, add a user and restart the server for testing. -The basic syntax for the file is user:password. You can create the file and add a user with the -echo command or edit with your favorite text editor. To add hacker:root -to the password file /etc/lighttpd/plain.passwd: +Finalmente, nós vamos criar agora o arquivo que contém as passwords, adicionar +um usuário e reiniciar o servidor para testar. A sintaxe básica para o arquivo +é user:password. Você pode criar o arquivo e pode adicionar um +usuário com o comando echo ou pode editar com seu editor de texto +favorito. Para acrescentar hacker:root ao arquivo de passwords +/etc/lighttpd/plain.passwd:

 # echo "hacker:root" > /etc/lighttpd/plain.passwd
- Or :
+ Ou :
  # nano /etc/lighttpd/plain.passwd
 

-To test the address: http://localhost/admin/, just restart the server: +Para testar o endereço: http://localhost/admin/, apenas reinicie +o servidor:

 # /etc/init.d/lighttpd restart
 
@@ -202,12 +212,12 @@
- Copyright © 2008 SliTaz - + Copyright © 2008 SliTaz - GNU General Public License;
Documentation is under GNU Free Documentation License