?
Solved

Aliases in apache

Posted on 2003-03-12
6
Medium Priority
?
271 Views
Last Modified: 2010-08-05
Hi All,

I'm busy creating a software depot on our intranet. basically it's a site where people within the company can browse for software for various platforms, and download. I want to create an alias in my virtual server.

The documentroot for my server is /var/www/html/software
The alias I want to set up is:

Alias /downloads/ "/var/www/downloads/"

Thought when I try to follow a link such as
http://intranet.mycompany.com/downloads/mysoftware.zip

I get an error about no permission. Is this because the alias points somwhere "below" my documentroot, or is there something else I need to add to the httpd.conf ?
0
Comment
Question by:jnbkze
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:PCBackup
ID: 8122861
This is probably due to the directory /var/www/downloads belonging to a priviliged account.  It should be accessible to the apache program, which requires that it belong to a non-privileged user (non-root on a unix box).  If you created it when logged on as an administrative user, then you probably just need to reassign the ownership to the apache program user, whatever that is on your box.

Gene
0
 
LVL 3

Author Comment

by:jnbkze
ID: 8126363
The permissions are rwxrwxrwx for that directory
0
 
LVL 1

Expert Comment

by:PCBackup
ID: 8127164
Opening up permissions is much more dangerous than just reassigning the directory to the apache user identity.  Giving everyone full access is not a good practice.

Gene
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 3

Author Comment

by:jnbkze
ID: 8127215
Hi Gene,

Agreed - it was for testing purposes only. Thing is - it still doesn't resolve my problem.
0
 
LVL 1

Accepted Solution

by:
PCBackup earned 80 total points
ID: 8133837
Do you have a <Location> block after the alias to specify the web access functions available?  For instance, if the default access for a web visitor is NONE because of where the directory is located, then you need to override it with something like the following...

    Alias /downloads /var/www/downloads/
    <Location /downloads>
      AllowOverride None
      Options All
      Order allow,deny
      Allow from all
    </Location>

Since it sounds like your directory is outside the base document tree, this might be necessary to give the web visitor access to the contents.  The "Allow from all" line specifies that anyone can access this directory's contents from any remote location.

Gene
0
 
LVL 3

Author Comment

by:jnbkze
ID: 8134854
Hi Gene,

Yip that's exactly what I was looking for!
the </location> tags in the conf file made all the difference

Thanks again.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question