?
Solved

How do i make an alias on my webserver?

Posted on 2003-03-13
7
Medium Priority
?
179 Views
Last Modified: 2010-04-20
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
7 Comments
 
LVL 8

Accepted Solution

by:
heskyttberg earned 100 total points
ID: 8139549
Hi!

Skip the first Alias that is wrong and not needed.
And do not make the dir:
/home/http/htdocs/cctvimages
This dir needs to be removed.

So:
1. rmdir /home/http/htdocs/cctvimages
2. Remove this line from httpd.conf:
Alias /home/me/images/ "/home/httpd/htdocs/cctvimages/"
3. Leave this line as is:
Alias /cctvimages/ /home/me/images/
4. Under this alias add the following.
<Directory /home/me/images>
  Options Indexes
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

That should do it.

Regards
/Hans - Erik Skyttberg
0
 
LVL 5

Expert Comment

by:pmsyyz
ID: 8156292
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 other users have permission to access /home/me/images/.  By default, you are probably the only one who has read access to those files.
0
 
LVL 2

Expert Comment

by:ChrisDrake
ID: 8162493
You just need to make a symbolic link.

Do this:-

cd /home/httpd/htdocs/
rmdir cctvimages
ln -s /home/me/images cctvimages

Now your directory "/home/me/images/" is exactly the same as "/home/httpd/htdocs/cctvimages/"

Have fun!
0
 
LVL 2

Expert Comment

by:ChrisDrake
ID: 8162504
p.s. You probably need to remove whatever stuff you put in your apache confi file earlier, and of course, you need to let people to be able to access the images directory - so if you get "you do not have permission..." errors when trying to see the images, you need to do this as well:-

chmod ugo+rx /home/me/images/

and possibly also this too:-

chmod ugo+x /home/me/
0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

777 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