Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cern Acces file (.htaccess) ?

Posted on 1997-06-25
1
Medium Priority
?
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
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. 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

715 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