Cern Acces file (.htaccess) ?

Posted on 1997-06-25
Medium Priority
Last Modified: 2012-06-27
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.

Question by:wittusen
1 Comment

Accepted Solution

Blu3Viper earned 200 total points
ID: 1585099
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.
 allow from .mindspring.com
 require valid-user

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.


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.



Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question