LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-14-2009, 01:31 AM   #1
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Rep: Reputation: 33
using .htaccess


Hi guys

A simple one I think I have two servers on my network one does most of thr graft, namely streaming, apache, rpg etc

The other does ftp, (on diff server due to sixe)

On my web site (tux2) I have link to my ftp dir on tux,
now I want to let every one look at it but I passwd protection for unsurprisingly /private dir.

where the heck do I put the .htaccess file?
 
Old 09-14-2009, 01:36 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
The .htaccess file goes in the /private dir and refers to the htpasswd file stored outside the www area, typically /etc/httpd dir.
 
Old 09-14-2009, 01:42 AM   #3
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by chrism01 View Post
The .htaccess file goes in the /private dir and refers to the htpasswd file stored outside the www area, typically /etc/httpd dir.
thanks, it seemed from the tuorials, the .htacces goes in the / of the website, which for my purpose, didn't make any sense. I presume I can the put the permissinons back to normal, 464 I think. ftp,johnh,other
 
Old 09-14-2009, 03:26 AM   #4
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
allowoverride

As I am running two apache's one on tux, and one on tux2, tux2 does world visible stuff.

so how do I ask it allowoveride to work on another box?

<Directory /home/ftp/private>
AllowOverride Options FileInfo
</Directory>

would work, but for the ftp on tux2, I want it to work for ftp on tux

ftp://tux.isa-geek.org <-- lands at tux:/home/ftp/
ftp://tux2.isa-geek.org <- tux2...et-al
 
Old 09-16-2009, 09:04 PM   #5
linuxraja
LQ Newbie
 
Registered: Sep 2009
Posts: 17

Rep: Reputation: 0
Isnt the .htaccess supposed to be there in each of the folders where you want to restrict file access?
Atleast - that's what I thought so far !


// removed spam link

Last edited by crabboy; 11-01-2010 at 08:17 AM.
 
Old 09-16-2009, 11:07 PM   #6
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by linuxraja View Post
Isnt the .htaccess supposed to be there in each of the folders where you want to restrict file access?
Atleast - that's what I thought so far !
that be so. I followed the desturtions, in a tutorial, it did work locally ie on that machine , but not from one 2 the other
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess help qwerty_tele Linux - Newbie 5 02-11-2008 08:31 PM
Help with .htaccess nazs Linux - Security 8 08-29-2006 01:31 AM
.htaccess ralide Linux - Software 3 06-18-2005 11:15 AM
.htaccess luca2005 Linux - Software 2 01-01-2005 07:38 PM
.htaccess Lionheart008 Linux - Newbie 1 10-15-2004 02:15 PM


All times are GMT -5. The time now is 07:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration