LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-19-2006, 10:32 AM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
A few questions regarding .htaccess


Greetings all,

I have a webserver up, and have been digging into .htaccess trying to get it as secure as I can get it.

Just a couple of questions if anyone has time to help me out.

First, is it possible to have more than one rewrite rule to prevent remote linking? For example, I'd like to prevent linking from mydomain.com globally, in every folder but one. I use mydomain.com/links to post up linked images/files/etc, and if possible I'd like to be able to keep that open and just use the rewrite to prevent remote linking in every other folder.

Secondly, I have a couple of domains forwarded to my main domain. The way my host is setup, if you go to domain1.com or domain2.com, they both forward to mydomain.com, but under my current setup the address bar in the browser maintains the URL of the original link.

(For a real example, go to extendedrangeguitar.com and you'll end up at sevenstring.org, but the browser maintains erg.com).

Thirdly, I read up on creating an .htpasswd file and did the following:

- Changed directories to a secure location outside of my web tree (we'll call it /home/linuxquestions/)
- Ran htpasswd -c .htpasswd username
- Put in my password

Now, I believe all I need to do is ass this in my .htpasswd where I want my pw-protected folders to be:

Code:
AuthUserFile /home/linuxquestions/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require user Username
My .htpasswd file looks like: Usernameencrypted pass). However I can't seem to login with the username/pass combo in question. What am I missing?

Thanks in advance for any insight.

- Chris

Last edited by Seventh; 01-19-2006 at 10:56 AM.
 
Old 01-19-2006, 05:47 PM   #2
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Just a wee bump.
 
Old 01-20-2006, 06:17 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Just a wee bump.
Ought not to be necessary, not even wee ones. We got automagic bump on. Besides that not all questions are answered equally fast.


First, is it possible to have more than one rewrite rule to prevent remote linking?
Can't see why not, but then again my mod_rewrite-fu isn't that good :-]
(This question and the one below have nothing to do with Linux, security or whatever. Would be better separate in Linux - Networking or Linux - General.)


Secondly, I have a couple of domains forwarded to my main domain.
Force a reload with page from the main domain?


However I can't seem to login with the username/pass combo in question.
And the errorlog says?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess ralide Linux - Software 3 06-18-2005 11:15 AM
.htaccess questions lothario Linux - Security 1 01-24-2005 07:50 PM
.htaccess kidestranged Linux - General 1 01-26-2004 10:18 AM
htaccess spank Linux - Newbie 1 10-27-2003 01:49 PM
htaccess help skillcoyne Linux - General 4 04-02-2003 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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