Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

.htaccess problem

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  How do I config an Intranet (newbie)  
Author Message
colin2

External


Since: Jul 11, 2003
Posts: 11



(Msg. 1) Posted: Fri Aug 08, 2003 11:15 pm
Post subject: .htaccess problem
Archived from groups: alt>apache>configuration (more info?)

hello, I have disabled directory browsing for all folders on my server and
written a .htaccess allowing it for one folder.

I would like to know what to put in a .htaccess file so that full access to
all directories is enabled for only two IP addresses. Is this possible?

Any help would be appreciated.

R.

 >> Stay informed about: .htaccess problem 
Back to top
Login to vote
nixonjos

External


Since: Aug 08, 2003
Posts: 1



(Msg. 2) Posted: Fri Aug 08, 2003 11:15 pm
Post subject: Re: .htaccess problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

why use .htaccess? unless you really need to, it uses more server
resources than simply setting this up globally (server will search for
and read .htaccess files in every folder when files are requested... )
plus you'll need to put the .htaccess file in every folder, and modify
every instance of it when you make changes.

two things to try - complex method first, simple workaround second:

(potentially) complex option - in httpd.conf try the following for your
directories (haven't tested it yet, ought to work, but may need to be
debugged or produce unforeseen consequences)

Options Indexes
AllowOverride Limit
<Limit OPTIONS>
Order allow,deny
Deny from all
Allow from (insert IP address 1)
Allow from (insert IP address 2)
</Limit>

this will of course kill all other options you have set for any user not
from the listed ip addresses, unless you really do set options to "all"
globally then restrict "indexes" on a per-directory basis... i don't
know if there's another way to set specific options on a per-IP basis.

simple option - disable directory browsing globally. set up a virtual
host on the same domain name and IP but a different port - then disallow
access to this host for anyone except the two IP addresses (order allow,
deny; deny from all; allow from IP#). use the same root directory. allow
directory browsing for the virtual host only. all other options leave as
set by the "main" server settings - you'll have effectively mirrored
your entire site, without having to use convoluted setups. access the
directories you wish to browse by connecting at the second port number
rather than port 80 - <a style='text-decoration: underline;' href="http://my.site:port#/" target="_blank">http://my.site:port#/</a>

hope this helps.

-josh

rusty wrote:

 >hello, I have disabled directory browsing for all folders on my server and
 >written a .htaccess allowing it for one folder.
 >
 >I would like to know what to put in a .htaccess file so that full access to
 >all directories is enabled for only two IP addresses. Is this possible?
 >
 >Any help would be appreciated.
 >
 >R.
 >
 >
 >
 >

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joshua Nixon
Graduate Student
Department of Zoology
Michigan State University nixonjos.RemoveThis@msu.edu <mailto:nixonjos@msu.edu>
<a style='text-decoration: underline;' href="http://www.msu.edu/~nixonjos" target="_blank">http://www.msu.edu/~nixonjos</a> <http://www.msu.edu/%7Enixonjos>
207 Giltner Hall
(517) 432-9922<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: .htaccess problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
I cant get .htaccess to work - I am runnning apache on SuSE 7.2 pro, I have several Virtual hosts all working correctly - I want to password protect one of the directories. but it doesnt want to work. I have added into the httpd.conf as follows <VirtualHost 212.19.66.163:80> ...

Can htaccess include another file? - Hi, I want to achieve something like this. Imagine I have a file called textfile_ips.txt which contains a whole bunch of IP addresses which I want to blocked, one per line. Can I do something like this? <Files "somefile.html"> deny ...

newbie question about .htaccess - I have a private website folder which I would like to password protect so I have followed the instructions on the Apache website and some other sites to write an .htaccess file. This results in a pop up box which asks for the username and password. The..

DirectoryIndex, and other commands for the htaccess file??? - I'm on a shared host (Apache/RedHat), and I'm new with setting up various directories for my files. I've created an htaccess file in the root, and I've set up most of my web site files under "/httpdocs". Inside that htaccess file, I've added..

.htaccess not looked at in aliased directory - Hi all, really appreciate some help on this! All my files within /var/www/html obey their .htaccess fine, including LIMIT commands and php_flag settings. However, I have an Alias in my httpd.conf like this... Alias /squirrelmail /var/www/squirrelmail/...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]