Apache: Difference between revisions
Jump to navigation
Jump to search
(Typo fixes) |
(More typo) |
||
Line 3: | Line 3: | ||
! File path !! What's there | ! File path !! What's there | ||
|- | |- | ||
| <code> /var/www </code> | Default web root | | <code> /var/www </code> || Default web root | ||
|- | |- | ||
| <code> /var/log/apache</code> | Logs | | <code> /var/log/apache</code> || Logs | ||
|- | |- | ||
| <code> /etc/apache2 </code> | Config files | | <code> /etc/apache2 </code> || Config files | ||
|} | |} | ||
Revision as of 12:36, 8 February 2011
File path | What's there |
---|---|
/var/www |
Default web root |
/var/log/apache |
Logs |
/etc/apache2 |
Config files |
User/pass restrictions
- Create a user/pass entry in a file for a username
htpasswd -c /usr/local/apache2/conf/htusers username
- Add the relavent bits to the
/etc/apache2/httpd.conf
file, eg<Directory />
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /usr/local/apache2/conf/htusers
Require valid-user
</Directory>
- Restart the apache service
service apache2 restart