LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-15-2012, 12:25 PM   #1
earthw0rmjim
Member
 
Registered: Sep 2011
Distribution: Debian testing
Posts: 62

Rep: Reputation: 12
[Apache] Is this a correct sites-enabled entry?


Hey!

I recently deleted my .htaccess files and moved the rules into apache's sites-enabled config file, since i'm told it's more secure.
Looks like this:
Code:
<Directory /var/www/directory>
		Options None
		AllowOverride AuthConfig
		Order allow,deny
		allow from all
		AuthType Basic
		AuthName "authname"
		AuthUserFile /pathto/.authuserfile
		Require user user01
	</Directory>
Is this a correct entry?
I basically just copy+pasted the .htaccess file, but not sure every line is necessary, it feels redundant somehow.

Thanks in advance!
 
Old 09-15-2012, 02:16 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

What you really don't need, is the "AllowOverride .." line, as you don't want to use .htaccess
Then you can also omit the
Quote:
Order allow,deny
allow from all
as you want to allow access to authenticated user only.

Cheers
 
1 members found this post helpful.
Old 09-15-2012, 02:34 PM   #3
earthw0rmjim
Member
 
Registered: Sep 2011
Distribution: Debian testing
Posts: 62

Original Poster
Rep: Reputation: 12
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] load balancing ssl enabled sites hamzar.pm Linux - Newbie 4 03-12-2013 10:24 AM
How to correct possibly wrong directory entry ? jbenezech Linux - Server 2 07-29-2012 08:31 PM
correct fstab entry for two disc drives, internal and external Cultist Slackware 2 01-14-2011 04:11 PM
Correct entry for local machine in /etc/hosts Kropotkin Linux - Networking 1 11-16-2004 05:41 PM
RH8/Apache - PHP installed but not enabled(?) bkeating Linux - Software 3 12-05-2002 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration