|
-
.htaccess prob for apache home web server
I made a home web server and created an .htaccess file so the sit would be password protected, I have this:
AuthType Basic
AuthName "This is a private area, please log in"
AuthUserFile "C:\Documents and Settings\Administrator\My Documents\Secure Server Files\mypass.txt"
AuthGroupFile /dev/null
<Limit GET POST PUT>
require valid-user
</Limit>
in the .htaccess file, and mypass.txt had the user and encrypted pass.
However it doesn;t work, soi though my pass thing was wrong but it wasn;t. When I tried to create custom 404 pages, and i put:
ErrorDocument 404 /notfound.html
in .htaccess, it did not use the notfound.html file i had created.
What did i do wrong?
P.S. when saving htaccess, i told wordpad to save as all files and i typed in ".htaccess" as the name. this way it wouldn;t save it as a txt doc
P.P.S.
This is my whole .htaccess file:
AuthType Basic
AuthName "This is a private area, please log in"
AuthUserFile "C:\Documents and Settings\Administrator\My Documents\Secure Server Files\mypass.txt"
AuthGroupFile /dev/null
<Limit GET POST PUT>
require valid-user
</Limit>
ErrorDocument 404 /notfound.html
thx in advance
Last edited by darkthreat; 05-10-2007 at 09:58 PM.
Dell Inspiron 6400 Laptop
Dual Core 1.8 GHz, 2 GB RAM
100 GB Hard Drive
bleh bleh
My Book Premium II
External 1 TB Hard Drive
OCZ Rally 2 Turbo
16 GB USB Drive
-
Your Apache config file (usually called httpd.conf) must have the required AllowOverride setting. To do user authentication and custom 404 pages make sure you have the following line in your httpd.conf file:
Code:
AllowOverride AuthConfig FileInfo
Right now you probably have:
Which tells Apache not to look for your .htaccess files.
Also, make sure Apache knows to look for .htaccess and not some other file name by checking for:
Code:
AccessFileName .htaccess
Last edited by Handyman; 05-11-2007 at 11:31 AM.
Reason: Forgot Something
| Processor | Intel Pentium 4 @ 2800 MHz | Motherboard | ABIT IC7-Max3 | Memory | 2 GB Corsair XMS PC3200 DDR | Graphics | ATI Radeon 9800 Pro | OS/Prog HDD | W.D. Raptor 36GB (10k) SATA | Storage HDD | Seagate 160GB (7200) SATA | Burner | Lite-On 52x24x52 CDRW | DVD-ROM | Lite-On 16x DVD | Sound Card | Philips Acoustic Edge | Speakers | Klipsch ProMedia 2.1 | Flash Media | Lian-Li Flash Media Bay | Display | Dual NEC 22" Flat CRT | Case/PSU | Lian-Li PC-65B w/ Antec 430W | O.S. | MS Windows XP Pro | Printer | Epson Stylus Photo 2200
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|