configuração servidor svn + apache

1. configuração servidor svn + apache

ricardo
ricardospinoza

(usa Ubuntu)

Enviado em 02/10/2010 - 17:13h

Boa tarde,

Segui alguns tutoriais na web[1] e instalei o subservion + apache2, porém estou agora tentando acessar o repositorio pelo browser, em alguns momentos solicita usuário e senha, porém qdo informo não autentica da a msg abaixo:

Forbidden

You don't have permission to access /svn/ged on this server.
Apache/2.2.12 (Ubuntu) Server at 192.168.7.40 Port 8070

minha estrutura está da seguinte forma:

local svn está em /desenvolvimento/svn/ged

##inicio apache.conf


#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#<IfModule !mpm_winnt.c>
#<IfModule !mpm_netware.c>
LockFile /var/lock/apache2/accept.lock
#</IfModule>
#</IfModule>

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

# event MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/log/apache2/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
#Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined


# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

##fim apache.conf

adicionei o usuário www-data no grupo subversion pelo que entendi este usário é do dameon do apache.

segue o listar do meu diretorio com as permissões:

##inicio listar diretorio svn
root@geddesenv:/desenvolvimento/svn# ls -ll
total 12
drwxrwsr-x 6 www-data subversion 4096 2010-10-02 15:17 exemplo
drwxrwsr-x 6 www-data subversion 4096 2010-10-02 16:30 ged
drwxrws--- 6 www-data subversion 4096 2010-10-01 17:58 teste

##fim listar diretorion svn

Alguém tem alguma idéia do que pode estar ocorrendo?


[1] tutoriais que utilizei:
http://www.ronaldorigoni.com.br/instalar-subversion-e-apache-ubuntu/?lang=pt
http://pronus.eng.br/blog/http:/pronus.eng.br/blog/autenticacao-basica-do-subversion-usando-apache-2
https://help.ubuntu.com/community/Subversion
http://www.debuntu.org/2006/05/20/54-how-to-subversion-svn-with-apache2-and-dav


  


2. Re: configuração servidor svn + apache

Rafael Umbelino
tlaloc

(usa Gentoo)

Enviado em 02/10/2010 - 17:17h

Falou tudo, menos o que você de fato quer fazer... :P

é um repositório de quê isso aí?


3. Re: configuração servidor svn + apache

ricardo
ricardospinoza

(usa Ubuntu)

Enviado em 02/10/2010 - 17:22h

Oi, obrigado pela atenção no tópico.
Eu quero montar um repósitorio pra acessar meus código java pelo netbeans.


4. Re: configuração servidor svn + apache

Rafael Umbelino
tlaloc

(usa Gentoo)

Enviado em 02/10/2010 - 17:25h

Então para a gente começar a brincar, muda as permissões do teste para tudo liberado.

chmod -R 777 teste


5. Re: configuração servidor svn + apache

ricardo
ricardospinoza

(usa Ubuntu)

Enviado em 02/10/2010 - 17:34h

ok, alterei a permissão, segue o print

root@geddesenv:/desenvolvimento/svn# ls -ll
total 12
drwxrwsr-x 6 www-data subversion 4096 2010-10-02 15:17 exemplo
drwxrwsr-x 6 www-data subversion 4096 2010-10-02 16:30 ged
drwxrwsrwx 6 www-data subversion 4096 2010-10-01 17:58 teste
root@geddesenv:/desenvolvimento/svn#

restartei o apache e testei, tentei acessar o endereco http://192.168.7.40:8070/svn/teste

retornou o erro:

Forbidden

You don't have permission to access /svn/teste on this server.
Apache/2.2.12 (Ubuntu) Server at 192.168.7.40 Port 8070



6. Re: configuração servidor svn + apache

Rafael Umbelino
tlaloc

(usa Gentoo)

Enviado em 02/10/2010 - 17:47h

Ótimo!

Agora, olha qual foi o erro que deu no log do apache.
Precisavamos de um erro puro com todas as permissões liberadas, assim, sobra só o problema e não teria nenhuma chance de uma possível "permissão" errada atrapalhar a mensagem de erro do log. ;)


7. Re: configuração servidor svn + apache

ricardo
ricardospinoza

(usa Ubuntu)

Enviado em 02/10/2010 - 17:54h

conteúdo do log /var/log/apache2/acess.log:

192.168.6.88 - admin [02/Oct/2010:17:51:44 -0300] "GET /svn/teste HTTP/1.1" 403 560 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 GTB7.1"


8. Re: configuração servidor svn + apache

Rafael Umbelino
tlaloc

(usa Gentoo)

Enviado em 02/10/2010 - 17:55h

Olha no error log, por favor. =-)


9. Re: configuração servidor svn + apache

ricardo
ricardospinoza

(usa Ubuntu)

Enviado em 02/10/2010 - 17:59h

ops, foi mau, segue o log do error:

[Sat Oct 02 17:51:37 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 17:51:37 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 17:51:37 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 17:51:44 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET teste:/



10. Re: configuração servidor svn + apache

Rafael Umbelino
tlaloc

(usa Gentoo)

Enviado em 02/10/2010 - 18:05h

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

Troca para warm, error, alert

reinicie o apache e teste de novo. Em seguida, olhe no log de erro do apache, para ver se ele pode dar uma saída mais útil.


11. Re: configuração servidor svn + apache

ricardo
ricardospinoza

(usa Ubuntu)

Enviado em 02/10/2010 - 18:14h

log flag alert:

[Sat Oct 02 18:04:41 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET teste:/
[Sat Oct 02 18:08:57 2010] [notice] caught SIGTERM, shutting down
[Sat Oct 02 18:08:58 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 18:08:58 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 18:08:58 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 18:09:24 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET testes:/
[Sat Oct 02 18:10:37 2010] [notice] caught SIGTERM, shutting down
[Sat Oct 02 18:10:38 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 18:10:38 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 18:10:38 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 18:10:41 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET testes:/

log com flag error:
[Sat Oct 02 18:04:41 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET teste:/
[Sat Oct 02 18:08:57 2010] [notice] caught SIGTERM, shutting down
[Sat Oct 02 18:08:58 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 18:08:58 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 18:08:58 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 18:09:24 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET testes:/

log warn:

[Sat Oct 02 18:04:41 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET teste:/
[Sat Oct 02 18:08:57 2010] [notice] caught SIGTERM, shutting down
[Sat Oct 02 18:08:58 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 18:08:58 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 18:08:58 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 18:09:24 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET testes:/
[Sat Oct 02 18:10:37 2010] [notice] caught SIGTERM, shutting down
[Sat Oct 02 18:10:38 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 18:10:38 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 18:10:38 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 18:10:41 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET testes:/
[Sat Oct 02 18:14:05 2010] [notice] caught SIGTERM, shutting down
[Sat Oct 02 18:14:06 2010] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sat Oct 02 18:14:06 2010] [notice] mod_python: using mutex_directory /tmp
[Sat Oct 02 18:14:06 2010] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.5 PHP/5.2.10-2ubuntu6.5 with Suhosin-Patch mod_python/3.3.1 Python/2.6.4 configured -- resuming normal operations
[Sat Oct 02 18:14:10 2010] [error] [client 192.168.6.88] Access denied: 'admin' GET testes:/




12. Re: configuração servidor svn + apache

Rafael Umbelino
tlaloc

(usa Gentoo)

Enviado em 02/10/2010 - 18:19h

Quais as permissões da sua pasta svn?



  
01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts