LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2011, 01:04 AM   #1
coolx
LQ Newbie
 
Registered: Aug 2011
Posts: 28

Rep: Reputation: Disabled
htaccess problem(permitting web files)


Hi,
I want to specifically control my web server's file and directories. For example a user should reach a file but another user shouldnt. For this reason I am trying to implement ".htaccess" to ubuntu. But its not working.

Firstly .htaccess is enable from "apache.conf" file.
-------------------------------
AccessFileName .htaccess
-------------------------------

Then I create a .htaccess file in "/var/www/" directory. I wrote the below in .htaccess file;
--------------------------------
<Files default.php>
Order allow,deny
Deny from all
</Files>
--------------------------------

But all users still reach this file. I tryed lots of combinations but still doesnt work. I think "allowoverride" is should use somethings in but I dont know in which file or directory?

Basically how can I do that?

Thanks.
 
Old 08-16-2011, 02:41 AM   #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,

Quote:
I think "allowoverride" is should use somethings in but I dont know in which file or directory?
You should set at least:
Code:
AllowOverride Limit
You can replace Limit with all if you want .htaccess to do more things

Regards
 
Old 08-16-2011, 03:13 AM   #3
coolx
LQ Newbie
 
Registered: Aug 2011
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,


You should set at least:
Code:
AllowOverride Limit
You can replace Limit with all if you want .htaccess to do more things

Regards
But in which file, should I change this line?
 
Old 08-16-2011, 03:18 AM   #4
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
For ubuntu you should follow the instructions here

Regards
 
1 members found this post helpful.
Old 08-16-2011, 03:29 AM   #5
coolx
LQ Newbie
 
Registered: Aug 2011
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
For ubuntu you should follow the instructions here

Regards
The link is usefull for me. Thanks a lot.
 
  


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
How can I disable Options +FollowSymlinks in .htaccess files on an Apache web server? abefroman Linux - Software 3 09-11-2010 09:25 AM
Looking for web app with htaccess management, download counter, file manager permalac Linux - Software 2 01-22-2010 06:05 AM
web site directory security? .htaccess or httpd.conf Moonman Linux - Software 0 03-03-2006 08:51 PM
directing to different web page using htaccess? Homer Glemkin Linux - Software 0 01-03-2005 08:04 AM
problem getting .htaccess files work wiggywag Slackware 6 02-17-2004 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:13 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