This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| faq:web04 [2015/11/13 16:45] – Coming from $HOME/html a 'pwd -P' might making clear, where to create the files. alex | faq:web04 [2015/11/13 16:46] (current) – alex | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| + | [04] CAN I PASSWORD PROTECT MY DIRECTORIES? | ||
| + | Yes you can. You can create usernames and passwords for | ||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | 1. Create a file called ' | ||
| + | want to protect (NOTE, its not a directory in your | ||
| + | HOME directory, but on the /www file system). Double check with 'pwd -P' | ||
| + | |||
| + | AuthUserFILE / | ||
| + | AuthGroupFILE /dev/null | ||
| + | AuthNAME "my protected files" | ||
| + | AuthTYPE Basic | ||
| + | require valid-user | ||
| + | <limit GET POST PUT> | ||
| + | order allow,deny | ||
| + | allow from all | ||
| + | </ | ||
| + | |||
| + | 2. run the ' | ||
| + | |||
| + | / | ||
| + | |||
| + | You will be prompted to enter a password for the | ||
| + | new user. After this first user is created, you | ||
| + | can then add additional users with: | ||
| + | |||
| + | / | ||
| + | |||
| + | When you run ' | ||
| + | only yourself and the webserver can read, execute and possibly | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | [[faq: | ||