SunQuest
           Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

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 Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 19th, 2001, 08:00 PM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
freebsd, yes I have done a search for this already so please don't call me lazy . No seriously I trust you will be able to solve this in about 10 seconds, I just can't figure it out.

I am fairly new to Apache so bear with me. I have an alias from my domain named router which points to a folder outside the web root. I need to password protect it, so I stuck an .htaccess file in there, but for some reason it doesn't prompt for a username and password. I assume the problem is the fact that the alias points to a folder outside the web root. So I added this to my Virtual host conf for this domain. But it didn't do anything

Alias /router/ "/home/httpd/mrtg/"
<Directory "/home/httpd/mrtg/">
AllowOverride All
AccessFileName htaccess
</Directory>

Any ideas, on what I can do?

Reply With Quote
  #2  
Old April 22nd, 2001, 08:25 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> it doesn't prompt for a username and password

Because you must access it via http://www.yourdomain.com/router/, not http://www.yourdomain.com/router.

A quick fix for it is to:

AliasMatch ^/router/?$ "/home/httpd/mrtg/"
<Directory "/home/httpd/mrtg/">
AllowOverride All
Options All
</Directory>

Reply With Quote
  #3  
Old April 22nd, 2001, 11:25 AM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I tried accessing it as both /router and /router/ with the same result, the oly thing I didn't add to the <Directory> directive is Options All, I will try that tommorow, thanks

Reply With Quote
  #4  
Old April 23rd, 2001, 11:13 AM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I threw this in the httpd.conf file

AliasMatch ^/router/?$ "/home/httpd/mrtg/"
<Directory "/home/httpd/mrtg/">
AllowOverride All
Options All
</Directory>



But its still not recognizing the .htaccess file. Here is the .htaccess file

AuthType Basic
AuthName "xxx, inc. router stats"
AuthUserFile /home/pathtoasswordfile/.htpasswd
require user admin

Reply With Quote
  #5  
Old April 23rd, 2001, 05:43 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You also need to put AccessFileName .htaccess in your httpd.conf. Also check and see if whether or not .htaccess is being read at all by placing a simple directive like Options -Indexes or something.

Reply With Quote
  #6  
Old April 23rd, 2001, 06:01 PM
freddydoesphp freddydoesphp is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2000
Posts: 669 freddydoesphp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Okay I got it, thanks, My boss snuck in and added some crap to the httpd.conf file over the weekend and I was adding my stuff above his, well to make a long story short, I just neede to get the AllowOverride All in there, thanks freebsd!

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > htaccess and aliases


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 2 hosted by Hostway