Cern Acces file (.htaccess) ?

I run a Cern server as our Web-server.
What i was wondering was how to set a .htaccess setup, is that possible with cern-server ?
I been at www.w3.org and gone true the whole documention, and tryed all kind of stuff (without progress).
So if someone know how to do it, please let me know.

/Christer
wittusenAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Blu3ViperCommented:
here is a simple .htaccess and .htpasswd pair.  these two are designed to allow users to retrieve pages based on their host, and user/pass authentication:

file: .htaccess

 AuthUserFile /usr/local/etc/httpd/htdocs/inhouse/.htpasswd
 AuthGroupFile /dev/null
 AuthName Sample Title for Pop-up
 AuthType Basic
 <Limit GET>
 order deny,allow
 deny from all
 allow from all
 allow from 205.230.56. 207.104.252. 127.0.0.1
 allow from .mindspring.com 205.236.175.51
 require valid-user
 </Limit>

note that you must specify full pathnames, not relative paths.  the above .htaccess file uses only a userfile specified in the AuthUserFile line.  no groupfile is used, but it certainly could be.

the next item to note is the title msg that is placed on the popup.

you can set your AuthType to one of several means if you have compiled in support for that type in your web server.  to be safe, start with basic authentication.

next you have your LIMIT block wherein you define what hosts are allowed and those that are denied.

to specify users, you have the option of the special keyword of "valid-user" along with specifying a specific user(s).  you can specify a specific user with the following

 require jon
 require joe
 require david



the .htpasswd file is very simple normally.  i won't go over any dbm type of setup.

 joe:6dB0A.x9VF7fg
 david:EowT1Y50GJ2Yk

this is a sample cut from a .htpasswd file.  very simple, only two fields.  username:password

you should use the utility htpasswd that should come with your web server software.  note that your utility may be named slightly differently.

the encrypted password is built the same way your /etc/password entries are made.  it is considered a Bad Thing(tm) to set your AuthUserFile to /etc/password, however it is just as functional.

be sure to set the permissions and ownership properly, on the .htpasswd file in particular as you do not want it being spread around.

-d

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.