Help with authorization on apache2?

I installed an apache2 web server on my ubuntu machine, and everything is great except for the fact that i need some sort of authentication to protect some files. How do i deploy basic authorization to my web server? i tried looking through the Apache documentation, but that didn’t help. i Made a password and users list using HTPASSWD, i just need the server to use it. please help, and where do i find an .htaccess file?
There is no htaccess file hidden, (?), can i make my own htaccess? if yes, what code do i need to include in it?

<Files ~ "^\folder-name-here">
Order allow,deny
deny from all
</Files>

add that to your httpd.conf

it well deny the file from being access

2 Responses to “Help with authorization on apache2?”

  1. The .htaccess file is hidden, so it won’t show up with an ls command in the terminal.

    If you browse to /etc/apache2 and enter the command ls -A, it will show you all files, including the hidden .htaccess

    You should then be able to edit the .htaccess file with whatever text editor you like. You may need root access to save it though.
    References :
    Run my own local webserver in ubuntu as well

  2. Avatar Darkness on December 14th, 2009 at 6:04 pm

    <Files ~ "^\folder-name-here">
    Order allow,deny
    deny from all
    </Files>

    add that to your httpd.conf

    it well deny the file from being access
    References :
    i run my apache2.2 for ps3 lol

Leave a Reply