|
|
|
| Вот такое находится в httpd.conf:
<VirtualHost *:80>
ServerName trac.test.org
ServerAdmin admin@test.org
<Location />
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /
</Location>
<LocationMatch "/[^/]+/login">
AuthType Basic
AuthName "Trac"
AuthUserFile /var/www/vcs.test.org/htpasswd
Require valid-user
</LocationMatch>
</VirtualHost>
# vim: ts=4 filetype=apache
|
При заходе на корень отображается список проектов, ссылка для входа имеет вид /projname/login
Как видно это обычная авторизация, но этот последний LocationMatch не срабатывает.
Как заставить работать авторизацию?
Apache/2.2.11 (Gentoo) mod_python/3.3.1 Python/2.5.4 PHP/5.2.9-pl2-gentoo with Suhosin-Patch
|
emerge --info:
Portage 2.1.6.13 (default/linux/x86/2008.0/server, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.18-128.1.1.el5.028stab062.3 i686)
=================================================================
System uname: Linux-2.6.18-128.1.1.el5.028stab062.3-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-glibc2.0
Timestamp of tree: Thu, 11 Jun 2009 15:15:02 +0000
app-shells/bash: 3.2_p39
dev-lang/python: 2.5.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc: 0.4.3-r3
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.63
sys-devel/automake: 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CPPFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://de-mirror.org/distro/gentoo/ "
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X509 acl animgif apache2 aspell auto-completion automap bash-completion berkdb big-tables bzip2 cgi cli
colordiff contentcache corefonts cracklib crypt ctype curl curlwrappers cyrillic dedicated deflate dot enca enscript erandom eselect exif extras
fastcgi ftp gd gdbm geoip gif git glibc-omitfp gmp gnuplot gpg graph graphite graphviz gs gzip hash html iconv imagemagick imap inifile ipv6
ithreads jabber javascript john jpeg jpeg2k jpgraph lapack libgcrypt libssh2 libwww logrotate loop-aes lzma lzo mailwrapper mbox md5sum
memcache mhash mime mmx mmxext mng mudflap mysql mysqli nagios-dns nagios-ping nagios-ssh ncurses nls nptl nptlonly openmp
openssl pam pcre pdf perl php plotutils plugins png pop pop3d posix postfix pppd procmail ps python rar raw readline reflection rpc rrdtool rss
rsync rtc sasl scp server session sha1 sha512 shadow sharedext sharedmem simplexml slang smime smp smtp snmp soap sockets spell
spl sql sqlite sqlite3 sse sse2 ssh ssl subversion suhosin svg svgz symlink sysfs syslog sysvipc tcpd tcpdump tcpwrapper threads
threadsafe threadsonly tidy tiff timezone tls tools truetype unicode unzip urandom vhosts vim vim-syntax web webdav webdav-neon x86 xhtml
xml xmlreader xmlrpc xmlwriter xpm xsl xslt zip zlib"
APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file
authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta charset_lite dav dav_fs dav_lock
dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio
mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http rewrite setenvif speling status
substitute unique_id userdir usertrack version vhost_alias"
APACHE2_MPMS="worker"
ELIBC="glibc"
LINGUAS="en ru"
|
| |
|
|
|
|
|
|
|
для: pini-pini
(13.06.2009 в 11:50)
| | Странно, у вас htpasswd не скрытый (т.е. без точки) и виден всем? | |
|
|
|
|
|
|
|
для: cheops
(13.06.2009 в 12:44)
| | Не в этом дело.
Да и он находится вне каталога доступного из вне:
DocumentRoot "/var/www/vcs.test.org/htdocs"
|
А он находится:
-rw-r--r-- 1 apache apache 47 2009-06-12 23:58 /var/www/vcs.test.org/htpasswd
|
| |
|
|
|
|
|
|
|
для: pini-pini
(13.06.2009 в 11:50)
| | И что странно, вот так работает, но только для каждого проекта придется заново кусок прописывать:
<VirtualHost *:80>
ServerName trac.test.org
ServerAdmin admin@test.org
DocumentRoot "/var/www/trac.test.org/htdocs"
<Directory "/var/www/trac.pini-pini.org/htdocs">
Options FollowSymLinks Includes MultiViews ExecCGI Includes Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location /projects/icdb>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/lib/trac/icdb
PythonOption TracUriRoot /projects/icdb
</Location>
<Location /projects/icdb/login>
AuthType Basic
AuthName "iCDB"
AuthUserFile /var/www/vcs.test.org/.htpasswd
Require valid-user
</Location>
</VirtualHost>
# vim: ts=4 filetype=apache
|
| |
|
|
|