Dead-Lands


The Dead-Lands Forum
It is currently Wed Sep 08, 2010 7:51 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Apache Server question
PostPosted: Thu Apr 02, 2009 7:51 am 
Offline
User avatar
Frank
 E-mail  WWW  Profile

Joined: Sun Jul 02, 2006 8:54 am
Posts: 4450
Location: 2 stones and a hop from the 6th portal on the left
trying to set this up, and I want visitors to be able to see the file structure, yet whenver I go to the address I either get the welcome page with no ability to browse to folders, or if I put an index.htm in there, that instead.

I think it's got to do with permissions somewhere but I can't find where. Anyone have any experience with Apache that has wanted to do this (most of the time you want this disabled, so I suspect it's disabled by default, just can't find where)

_________________
Global Warming makes me cold


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 8:23 am 
Online
User avatar
The Watcher
The Watcher
 Profile

Joined: Thu Aug 03, 2006 7:21 pm
Posts: 993
Throw this into your htaccess file:

Options +Indexes

_________________
coelum non animum -- Another waste of time; another dream in flames.

"Perhaps the most fundamental problem, however, is that INTJs really want people to make sense."


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 9:16 am 
Offline
User avatar
Frank
 E-mail  WWW  Profile

Joined: Sun Jul 02, 2006 8:54 am
Posts: 4450
Location: 2 stones and a hop from the 6th portal on the left
just to be clear, where is my .htaccess normally supposed to reside?
yes I am that much of a noob.

my docs are /var/www/html if that helps, and this is on a fedora system

_________________
Global Warming makes me cold


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 10:04 am 
Online
User avatar
The Watcher
The Watcher
 Profile

Joined: Thu Aug 03, 2006 7:21 pm
Posts: 993
Should be somewhere in your apache configuration directory. If memory serves, that should be /etc/httpd or /etc/apache.

Though, keep in mind, sometimes the htaccess materials are declared in-line in your apache configuration.

_________________
coelum non animum -- Another waste of time; another dream in flames.

"Perhaps the most fundamental problem, however, is that INTJs really want people to make sense."


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 10:10 am 
Offline
User avatar
Frank
 E-mail  WWW  Profile

Joined: Sun Jul 02, 2006 8:54 am
Posts: 4450
Location: 2 stones and a hop from the 6th portal on the left
hmm well when I put that in the .htaccess I get an Internal Server Error (500), remove the .htaccess and it's back to how it was.

_________________
Global Warming makes me cold


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 10:32 am 
Offline
User avatar
Frank
 E-mail  WWW  Profile

Joined: Sun Jul 02, 2006 8:54 am
Posts: 4450
Location: 2 stones and a hop from the 6th portal on the left
So I want to password protect this directory, so I put in the httpd.conf AllowOverride AuthConfig for the "/var/www/html" directory, and then put the following in an .htaccess file:

Code:
AuthName "Login to the Private Area"
AuthType Basic
AuthUserFile /var/www/html/.htpasswd
Require user somename
Options +Indexes


and then edit/create the .htpasswd with:
Code:
htpasswd -cmb .htpasswd somename somepass


and I get a 500 error, if I remove the .htaccess I load just the index.html file

If I change my conf to :
Code:
AllowOverride All


same 500
If I remove eveything but the Options +Indexes then it works for listing the directorys but no pass protect

_________________
Global Warming makes me cold


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 10:41 am 
Offline
User avatar
Frank
 E-mail  WWW  Profile

Joined: Sun Jul 02, 2006 8:54 am
Posts: 4450
Location: 2 stones and a hop from the 6th portal on the left
grrr figured it out, my htaccess is now:
Code:
Options +Indexes
AuthName "Re-Encoded Vids"
AuthType Basic
AuthUserFile /var/www/DivX/.htpasswd
require valid-user


It was the last line that was killing me, going to change the AllowOverride option back to AuthConfig and make sure this is working right.

_________________
Global Warming makes me cold


Top
 

 Post subject: Re: Apache Server question
PostPosted: Thu Apr 02, 2009 1:53 pm 
Offline
User avatar
Frank
 E-mail  WWW  Profile

Joined: Sun Jul 02, 2006 8:54 am
Posts: 4450
Location: 2 stones and a hop from the 6th portal on the left
So if I change the AllowOverride option in my httpd.conf to AuthConfig I get 500 errors, if I change it to All I get the login prompt at the specified directory with the .htaccess and .htpasswd.

So my question is, what does having AllowOverride set to All really do, and why does AuthConfig not work?

_________________
Global Warming makes me cold


Top
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
Design By Poker Bandits     
Updated By phpBBservice.nl