LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 03-13-2003, 01:30 PM   #1
meluser
Member
 
Registered: Mar 2003
Posts: 65

Rep: Reputation: 15
How do i make an alias on my webserver?


Hi list

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
 
Old 03-13-2003, 02:39 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
There is a section in httpd.conf that specifically deals with this. It looks like this:

#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/var/www/icons/"

#
# This should be changed to the ServerRoot/manual/. The alias provides
# the manual, even if you choose to move your DocumentRoot. You may comment
# this out if you do not care for the documentation.
#
Alias /manual "/var/www/manual"
 
Old 03-13-2003, 02:45 PM   #3
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
thanks. I have done this,

# This Alias is to allow for the cctvimages to be displayed on the site.
#

Alias /cctvimages/ "/home/me/images/"

<Directory "/home/me/images">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
Old 03-13-2003, 02:48 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Quote:
error: Forbidden: you dont have permission to access/cctvimages/
Check your permissions on this directory.
 
Old 03-13-2003, 02:52 PM   #5
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
how? please help me out?

http://134.36.16.12/cctvimages/
 
Old 03-13-2003, 02:57 PM   #6
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Do this:

chmod 755 /home/me/images
 
Old 03-13-2003, 03:01 PM   #7
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
still the same error:

[root@cctv /]# chmod 755 /home/me/images/
[root@cctv /]#
 
Old 03-13-2003, 03:03 PM   #8
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
I said:

Quote:
chmod 755 /home/me/images
You did:

Quote:
chmod 755 /home/me/images/
 
Old 03-13-2003, 03:04 PM   #9
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
sorry i did both.

[root@cctv /]# su
[root@cctv /]# chmod 755 /home/me/images
[root@cctv /]# chmod 755 /home/me/images/
[root@cctv /]#
 
Old 03-13-2003, 03:05 PM   #10
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Do you have any files in that directory? Unless you have an index.html or index.htm you can't just go to directory. You must specify a file.

What files do you have in that directory?
 
Old 03-13-2003, 03:06 PM   #11
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
nothing, this is why i am trying to make an Alias.

i have images in /home/me/images.
 
Old 03-13-2003, 03:07 PM   #12
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
so when i try to get this, i get the same error:

http://cctv.dundee.ac.uk/cctvimages/...3_12_05_20.jpg
 
Old 03-13-2003, 03:09 PM   #13
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Each directory has to have read and enter permissions for people in order for them to be able to access the pictures. You probably have to change the permissions on the /me directory as well:

chmod 755 /home/me
 
Old 03-13-2003, 03:11 PM   #14
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
beautiful, thanks alot.

it is working. thanks.
 
Old 03-13-2003, 03:11 PM   #15
meluser
Member
 
Registered: Mar 2003
Posts: 65

Original Poster
Rep: Reputation: 15
thanks,

another question if i may, is there away to display a thumbnail picture?

Regards,
Mel
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I make an alias? quintan Linux - Software 2 11-25-2005 03:44 AM
How to make an alias? Gins Linux - General 6 06-06-2005 07:13 PM
How to make alias of 'ls' in winxp/dos servnov General 4 11-04-2004 08:39 PM
make an alias in winXP zchoyt Linux - General 2 09-14-2004 08:33 AM
Make symbolic link or alias gubak Linux - Newbie 5 08-20-2004 12:50 PM


All times are GMT -5. The time now is 06:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration