Solved

Cern Acces file (.htaccess) ?

Posted on 1997-06-25
1
333 Views
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.

/Christer
0
Comment
Question by:wittusen
1 Comment
 

Accepted Solution

by:
Blu3Viper earned 100 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. 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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
squid3 ntlm and itunes authentication 5 74
FTP: Servname not supported for ai_socktype 7 338
LDAP setup? 9 82
Issue to mail 11 39
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now