• DEPARTMENT
    • Overview
    • Computing
    • Facilities
    • Organizations
    • Scholarship Awards
    • Employment
    • Advisory Committee
    • Contact
  • ACADEMICS
    • Undergraduate
      • Computer Eng.
      • Electrical Eng.
      • Ambassadors
    • Graduate
      • Information for Prospective Students
      • ECE Graduate Handbook
      • Graduate Forms
      • Ph.D. Qualifying Exam
      • Distance Education
      • Frequently Asked Questions (FAQ)
    • Courses
    • Student Survival kit
    • Distance Learning
  • PEOPLE
    • Faculty
    • Staff
  • PROSPECTIVE STUDENTS
    • Overview
    • FAQ
    • Considering ECE
    • Scholarships
    • PC Requirements
    • Office of Admissions
  • RESEARCH
    • Overview
    • Signal Processing & Communications
    • Digital Systems & Microelectronics
    • Power & High Voltage
    • Research Centers
      • Emerging Materials Research Laboratory
      • High Voltage Laboratory
      • Robotics
    • HPCC
  • ALUMNI
Webserver - .htaccess Files - Ece
Personal tools
  • Log in
Views
  • Page
  • Discussion
  • View source
  • History

Webserver - .htaccess Files

From Ece

(Redirected from Webserver - Htaccess Files)
Jump to: navigation, search

To limit access to web pages in the ECE environment, you can use htaccess files. To create an htaccess file, create a new file, called .htaccess, in the directory that you wish to protect. Please notice that the filename begins with a period. Inside the file, you will have lines that tell the server how you want users to authenticate and who can have access. Below you will find recipes for creating htaccess files.

Example htaccess file to allow certain ECE users or groups access to a web page:

The following example should be used when the webpage needs to be limited to certain people or groups of people who already have an ECE account.

AuthLDAPURL ldap://ldap.ece.msstate.edu/ou=people,dc=ece,dc=msstate,dc=edu?uid
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off
AuthName "Secure Webpage"
AuthType Basic
require ldap-user ECEUSER
require ldap-group cn=ECEGROUP,ou=groups,dc=ece,dc=msstate,dc=edu

In the example above, replace ECEUSER with the ECE user ID for the person you wish to have access. Duplicate the "require ldap-user" line for each person you wish to have access.

For group access, replace ECEGROUP, in the example above, with the ECE group you want to have access. This line can be duplicated as many times as you need to list all the groups you need.

Example htaccess file to allow a specific user to access a page:

The following example should be used when the webpage needs to be limited with a username and password that will be shared by several people. In this case, the username isn't related to an ECE account. The username can be anything that you wish to use.

  • First create a password file that will store the username and password that you plan to use to secure the page. The htpasswd command is available on the Yavin server.
htpasswd -c htpasswd USERNAME

Replace USERNAME with the username you wish to use to authenticate. In this example the password file is called "htpasswd". You can use a different name, but you will need to use that name in the config files below. The htpasswd program will ask for you to enter the password you want to use.

  • After creating the password file, you need to create a ".htaccess" file in the directory. The contents of the file should be:
AuthName "Secure Webpage"
AuthType Basic
AuthUserFile DIRETORYPATH/htpasswd
require user USERNAME

Replace USERNAME with the same username you created with the htpasswd command. Replace DIRECTORYPATH with the path to the password file.

Retrieved from "http://www.ece.msstate.edu/wiki/index.php/Webserver_-_.htaccess_Files"
Category: Admin:Recipes
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
SEARCH
TOOLBOX
LANGUAGES
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Powered by MediaWiki
  • This page was last modified on 16 November 2007, at 17:13.
  • This page has been accessed 943 times.
  • Privacy policy
  • About Ece
  • Disclaimers

Mississippi State University Home| PO Box 9571, Mississippi State, MS 39762 | Main Office: 1.662.325.3912

Bagley College of Engineering | Mississippi State University| Legal| Webmaster| Intranet

Page modified: Tue, 23 Sep 2008 15:18:39 CDT