LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-29-2010, 08:35 PM   #1
jmoschetti45
Member
 
Registered: Oct 2004
Location: Michigan
Distribution: Debian Squeeze (2.6.32-5)
Posts: 137
Blog Entries: 1

Rep: Reputation: 17
Apache2 + Alias + .htacess


I have a few aliases setup in the config of a few sites. I have the main htdocs folder with a .htacess file requiring login. If I go straight to any of the aliases, it doesn't require the login. How can I fix this?

Not using aliases will make the directory listing hard to navigate, and reveal a lot of things that shouldn't be public, so that's not an option.

To complicate things, almost everything is a symlink to different places.

I'll do my best to create an example since I can't post the actual config.

Code:
/var/www/example
    .htpasswd
    htdocs -> /mnt/disk1/Files1 (.htacess is in the actual folder)
    list.txt (list of the files/folders in htdocs) (accessible by /list)
    new.txt (list of recent updates in htdocs) (accessible by /new)
    Media -> /mnt/disk2/Media
    Misc -> /mnt/disk2/Misc

Code:
vhost config:

        DocumentRoot /var/www/example/htdocs/
        Alias /favicon.ico "/var/www/example/favicon.ico"
        Alias /list "/var/www/example/list.txt"
        Alias /new "/var/www/example/new.txt"
        Alias /Media "/var/www/example/Media"
        Alias /Misc "/var/www/example/Misc"

Edit: Found a temporary solution. I symlinked the .htaccess in htdocs into /var/www/example.

Still would like a better solution if possible

Last edited by jmoschetti45; 01-29-2010 at 08:40 PM.
 
  


Reply



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
Apache2 configuration - www alias doesn't work phil333 Linux - Newbie 7 10-14-2009 09:45 AM
Wildcard email alias in /etc/alias file custangro Linux - Enterprise 1 10-02-2009 12:17 PM
Apache2 - have to restart apache2 process every 10 mins to clear /tmp directory.... levi dehaan Linux - Software 8 09-01-2009 06:34 PM
403 forbidden in Alias on apache2 TruthSeeker Linux - Server 2 06-17-2008 12:35 PM
Alias question (2 commands for one alias) gflores Linux - Newbie 3 01-21-2006 12:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:41 PM.

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