LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 10-22-2009, 03:22 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
Making Hidden Filed Visible under Directory Indexing in Apache?


Whenever I browse through http://localhost/publish
it shows:

Index of /publish
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
[DIR] Fedora-9/ 22-Oct-2009 18:11 -
[DIR] Fedora-11/ 22-Oct-2009 18:01 -
Apache/2.2.11 (Fedora) Server at localhost Port 80

Now I have created a hidden file .htaccess under Fedora-11.
How can I make it visible under Fedora-11.
 
Old 10-22-2009, 05:17 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by your_shadow03 View Post
Whenever I browse through http://localhost/publish
it shows:

Index of /publish
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
[DIR] Fedora-9/ 22-Oct-2009 18:11 -
[DIR] Fedora-11/ 22-Oct-2009 18:01 -
Apache/2.2.11 (Fedora) Server at localhost Port 80

Now I have created a hidden file .htaccess under Fedora-11.
How can I make it visible under Fedora-11.
Why do you want to make this file visible? There is a reason dotted files aren't visible to casual visitors, in particular this one.

It's one thing to make it visible to the site maintainer, it is quite another to make it visible to the world.
 
Old 10-22-2009, 05:21 AM   #3
vijay_babu1981
Member
 
Registered: Nov 2004
Location: india
Distribution: fedora 10
Posts: 82

Rep: Reputation: 19
Either remove the . from .htacess or create a symbolic link to this file.

I am not sure about the later part of above comment but you can try.
 
Old 10-22-2009, 05:40 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
How can I make it visible under Fedora-11.
I think OP wants to see it locally in the file browser, not in a web browser; but I might be wrong. ls -al should show it (in terminal)
 
Old 10-22-2009, 05:45 AM   #5
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
All I want is to let a friend of mine provide with the overall files contained in the directory?
 
Old 10-22-2009, 05:59 AM   #6
vijay_babu1981
Member
 
Registered: Nov 2004
Location: india
Distribution: fedora 10
Posts: 82

Rep: Reputation: 19
Quote:
Originally Posted by your_shadow03 View Post
All I want is to let a friend of mine provide with the overall files contained in the directory?
Then create a tarball of the directory and compress it and place it somewhere visible to him. This way he will only have to download only 1 compressed file.
 
Old 10-22-2009, 06:04 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
What if I want a user acess the certain portion of directory through username/password?
Is that possible?
 
Old 10-22-2009, 07:07 AM   #8
vijay_babu1981
Member
 
Registered: Nov 2004
Location: india
Distribution: fedora 10
Posts: 82

Rep: Reputation: 19
Quote:
Originally Posted by your_shadow03 View Post
What if I want a user acess the certain portion of directory through username/password?
Is that possible?
You can use html forms and PHP for password authentication. There are good tutorials on PHP/HTML present on the web.
 
Old 10-22-2009, 07:22 AM   #9
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I had the following Directory Structure which I want to open with authentication:
Code:
Index of /publish
[ICO]	Name	Last modified	Size	Description
[DIR]	Parent Directory	 	-
[DIR]	Fedora-9/	22-Oct-2009 18:11 	-
[DIR]	Fedora-11/	22-Oct-2009 18:01 	-
Apache/2.2.11 (Fedora) Server at localhost Port 80
What I did is :
Code:
<Directory /usr/web/www/publish>
Options Indexes FollowSymlinks
AllowOverride None
#<Files /usr/web/www/publish/Fedora-9/SOURCES/index>
#Order deny,Allow
#Satisfy Any
#</Files>
</Directory>
<Directory /usr/web/www/publish/>
AuthType Basic
AuthName 'Restricted Stuff"
AuthUserFile /usr/web/www/auth.user
Require valid-user
</Directory>
And It did work.
This seems ok but the QUESTION IS:

How Can I allow users to browse the page above publically accessible.But SOURCES under FEdora-9 to ask for username/passwd?

Last edited by your_shadow03; 10-22-2009 at 07:26 AM.
 
Old 10-22-2009, 07:43 AM   #10
vijay_babu1981
Member
 
Registered: Nov 2004
Location: india
Distribution: fedora 10
Posts: 82

Rep: Reputation: 19
It seems that you do not have any html/php page being displayed when people visit your website. Why dont you create a simple webpage in php and name it as index.php. Dont present a direct listing of the directory which you want to password protect. Place that index.php with password forms in that directory and challenge the visitors for authentication.

There may be other simpler ways, it may be possible to do this directly as you are doing it currently, but this is how i did it.
 
Old 10-22-2009, 09:31 AM   #11
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Buddy..I understand what you mean.
I know index.php should have forms to accept username/password.
But that is totally different and not what I mean to ask.
I want to put Authentication for particular directory in Directory Indexes?
What I want is Whenever Someone click on Fedora 9 it shud ask for password?

What you say is PHP form which accept username/passwd?
 
Old 10-23-2009, 04:51 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Closed ... one of serverl (>5 dupes/closely related threads)
 
  


Closed Thread


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
Apache Directory Indexing and permission? your_shadow03 Linux - Newbie 3 10-20-2009 11:30 PM
Can not disable Directory Indexing on a Slackware 9.1 Apache 1 Webserver... mtlhd Linux - Server 4 09-22-2009 11:13 AM
Trouble making Apache visible on the internet dbemont@rochester.rr Linux - Newbie 4 07-24-2008 04:36 AM
Directory Indexing Apache bborisovich Linux - Server 2 03-07-2008 09:16 AM
Apache Directory Indexing 403 Error 70k51k Linux - Software 0 09-30-2003 12:26 AM


All times are GMT -5. The time now is 10:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration