Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old December 20th, 2004, 06:45 PM
r_palkovic r_palkovic is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: San Diego, CA USA
Posts: 129 r_palkovic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to r_palkovic Send a message via AIM to r_palkovic Send a message via Yahoo to r_palkovic
.htaccess .htpasswd won't work

Alright. I'm trying to add the immediatly following access control commands to my apache server. It won't work, and I can't figure out why. The entire contents of my httpd.conf is listed below.

The server is apache 2.0.52, running on a windows 2000 machine.

Code:
<Directory "/www/webroot/Gallery/albums/People/Krystal">
		Order allow,deny
		Allow from all
	
		AuthType Basic
		AuthName "Restricted Access"
		AuthUserFile "/www/webroot/Gallery/albums/People/Krystal/.htpasswd"
		require valid-user
	</Directory>


Code:
Listen 80
ServerRoot "/www/Apache2"
DocumentRoot "/www/webroot"

ServerName localhost:80
ServerAdmin admin@localhost

ServerSignature On
ServerTokens Full

DefaultType text/plain
AddDefaultCharset ISO-8859-1

UseCanonicalName Off

HostnameLookups Off

ErrorLog logs/error.log
LogLevel warn

PidFile logs/httpd.pid

Timeout 300

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15


<IfModule mpm_winnt.c>
	ThreadsPerChild 250
	MaxRequestsPerChild 0
</IfModule>


LoadModule access_module modules/mod_access.so
#LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
#LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
#LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
LoadModule headers_module modules/mod_headers.so
#LoadModule imap_module modules/mod_imap.so
#LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
#LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
<IfDefine SSL>
	LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
LoadModule logio_module modules/mod_logio.so
LoadModule deflate_module modules/mod_deflate.so

LoadFile "/www/perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so
PerlRequire "/www/Apache2/conf/extra.pl"

LoadFile "/www/php/php4ts.dll"
LoadModule php4_module /www/php/php4apache2.dll


<Location />
	<IfModule mod_deflate.c>
		AddOutputFilterByType DEFLATE text/html text/plain text/css
		<IfModule mod_headers.c>
			Header append Vary User-Agent
		</IfModule>
	</IfModule>
</Location>


<Directory />
	Options None
	AllowOverride None
	Order allow,deny
	Deny from all
</Directory>


<Directory "/www/webroot">
	Order allow,deny
	Allow from all
</Directory>


<IfModule mod_auth.c>
	<Files ~ "^.ht">
		Order allow,deny
		Deny from all
	</Files>

	Alias /private "/www/private"

	<Directory "/www/private">
		<IfModule mod_autoindex.c>
			Options Indexes
		</IfModule>

		Order allow,deny
		Allow from all

		AuthType Basic
		AuthName "Private Access"
		AuthUserFile "/www/private/.htpasswd"
		require valid-user
	</Directory>
	
	<Directory "/www/webroot/Gallery/albums/People/Krystal">
		Order allow,deny
		Allow from all
	
		AuthType Basic
		AuthName "Restricted Access"
		AuthUserFile "/www/webroot/Gallery/albums/People/Krystal/.htpasswd"
		require valid-user
	</Directory>
</IfModule>


<IfModule mod_cgi.c>
	ScriptAlias /cgi-bin/ "/www/cgi-bin/"

	<Directory "/www/cgi-bin">
		Options None
		AllowOverride None
		Order allow,deny
		Allow from all
	</Directory>
</IfModule>


Alias /phpMyAdmin "/www/phpMyAdmin"

<Directory "/www/phpMyAdmin">
	Options None
	AllowOverride None
	Order deny,allow
	Deny from all
	Allow from 127.0.0.1
	Allow from 68.7.252.253
	Allow from 64.167.179.165
</Directory>

<Directory "/www/webroot/stats">
	Order deny,allow
	Deny from all
	Allow from 127.0.0.1
	Allow from 68.7.252.253
	Allow from 64.167.179.165
</Directory>


<IfModule mod_log_config.c>
	LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-agent}i"" combined
	CustomLog logs/access.log combined
	<IfModule mod_deflate.c>
		DeflateFilterNote Input instream
		DeflateFilterNote Output outstream
		DeflateFilterNote Ratio ratio
		LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
		CustomLog logs/deflate.log deflate
	</IfModule>
</IfModule>


<IfModule mod_dir.c>
	DirectoryIndex index.html index.php
</IfModule>


<IfModule mod_mime.c>
	TypesConfig conf/mime.types
	AddType application/x-compress .Z
	AddType application/x-gzip .gz .tgz
	AddType application/x-rar-compressed .rar
	<IfModule sapi_apache2.c>
		AddType application/x-httpd-php .php
		AddType application/x-httpd-php-source .phps
	</IfModule>
</IfModule>


<IfModule mod_setenvif.c>
	BrowserMatch "Mozilla/2" nokeepalive
	BrowserMatch "MSIE 4.0b2;" nokeepalive downgrade-1.0 force-response-1.0
	BrowserMatch "RealPlayer 4.0" force-response-1.0
	BrowserMatch "Java/1.0" force-response-1.0
	BrowserMatch "JDK/1.0" force-response-1.0
	BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
	BrowserMatch "^WebDrive" redirect-carefully
	BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
	BrowserMatch "^gnome-vfs" redirect-carefully
	<IfModule mod_deflate.c>
		BrowserMatch ^Mozilla/4 gzip-only-text/html
		BrowserMatch ^Mozilla/4.0[678] no-gzip
		BrowserMatch bMSIE !no-gzip !gzip-only-text/html
	</IfModule>
</IfModule>


<IfModule mod_status.c>
	ExtendedStatus On
	<Location /server-status>
		SetHandler server-status
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
		Allow from 68.7.252.253
		Allow from 64.167.179.165
	</Location>
</IfModule>


<IfModule mod_info.c>
	<Location /server-info>
		SetHandler server-info
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
		Allow from 68.7.252.253
		Allow from 64.167.179.165
	</Location>
</IfModule>


<IfModule mod_perl.c>
	PerlModule Apache::Status
	<Location /perl-status>
		SetHandler perl-script
		PerlResponseHandler Apache::Status
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
		Allow from 68.7.252.253
		Allow from 64.167.179.165
	</Location>
</IfModule>


<IfModule mod_ssl.c>
	Include conf/ssl.conf
</IfModule>


##### Start -- mod_perl Hello example, wwwperlsitelibApacheHello.pm
#
<IfModule mod_perl.c>
	PerlModule Apache::Hello
	<Location /hello>
		SetHandler modperl
		PerlResponseHandler Apache::Hello
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
		Allow from 68.7.252.253
		Allow from 64.167.179.165
	</Location>
</IfModule>
#
##### End -- mod_perl Hello example

Reply With Quote
  #2  
Old December 21st, 2004, 10:20 PM
rehfeld_dot_us rehfeld_dot_us is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 825 rehfeld_dot_us User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: .htaccess .htpasswd won't work

how have you determined this "doesnt work"

please describe.


also, make sure you have restarted apache. when you change that file it wont take effect until you do.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > .htaccess .htpasswd won't work


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway