?
Solved

How do i make an alias on my webserver?

Posted on 2003-03-13
3
Medium Priority
?
190 Views
Last Modified: 2010-03-04
Hi experts,

How do i make an alias on my webserver?

i have images on my machine located in /home/me/images/. i would like to be able to access them on /home/httpd/htdocs/

i have tried this:
Alias /home/me/images/ "/home/httpd/htdocs/cctvimages/"
Alias /cctvimages/ /home/me/images/

the first just displays parent directory (go back), the seocnd shows an error: Forbidden: you dont have permission to access/cctvimages/

i have mkdir cctvimages in /home/http/htdocs/cctvimages

Regards,
Mel
0
Comment
Question by:melawaisi
[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
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
samri earned 80 total points
ID: 8134452
Hi Mel,

Much detailed discussion on Alias: http://httpd.apache.org/docs/mod/mod_alias.html

/home/httpd/htdocs is your DocumentRoot - where the default pages will be served.

In your case, you would need to map your alias to a different physical directory and make it appear as it is coming from the webroot.  One way is using OS Symbolic link feature.

Or you could use Apache Alias directive (as you wish),

If you want the files in /home/me/images to be available in http://www.yourserver.com/images, then you would need to have the following Alias

Alias /images     /home/me/images

<Directory "/home/me/images">
   Options Indexes MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>

And make sure that you had reset permission for /home/me/images folder to be at least world-readable.  chmod 755 /home/me/images would do.  To check, try to "su - apache" and try to "cd /home/me/images"

good luck.
0
 

Author Comment

by:melawaisi
ID: 8134488
thanks. i actually got something similar, after researching, but your answer is perfect. cheers
0
 
LVL 15

Expert Comment

by:samri
ID: 8134545
hi Mel,

great.

Just feel free to ask should you need more assistance.


cheers.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

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 Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

771 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