Solved

ln

Posted on 2006-07-10
4
374 Views
Last Modified: 2010-05-18
ln -s /home/deb /var/www/deb    when I go to  http://192.168.0.32/deb  It show index of deb but not show the detail of
fike in the direc tory deb  I copy to iso imagre of  debian to /home/deb directory so i can in stall debian form net work
Please suggest
0
Comment
Question by:teera
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 240 total points
Comment Utility
From a web server security perspective, normally the server *WILL NOT* allow you to browse anythign outside of the web root directory.

ln -s is creating a symbolic link to a location oputside of your root web directory, and therefore will not work.

Copy the folder into the appropriate web directory:

cp -R /home/deb /var/www/deb

in order to do what you are wanting.

(   (()
(`-' _\
 ''  ''
0
 
LVL 16

Assisted Solution

by:xDamox
xDamox earned 50 total points
Comment Utility
Hi,

pjedmond is correct about the security prospective, but you can however in the httpd.conf set it to following symbolic links
by default I belive its disabled.
0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 240 total points
Comment Utility
As an aside, the default Apache directory these days in linux is:

/var/www/

There is then an html folder for 'normal' files:

/var/www/html/

which is effectively the 'default' root of the http://www.myserver.com/

/etc/httpd/conf/httpd.conf (or similar) is the 'default' config file for apache.

http://httpd.apache.org/docs/2.0/mod/core.html#options

FollowSymLinks is what you would need to use. However bear in mind that in order to do this, the alloveride must also be enabled within the config file.

(   (()
(`-' _\
 ''  ''

0
 
LVL 1

Assisted Solution

by:bengtbj
bengtbj earned 90 total points
Comment Utility
As pjedemond said, its a security feature, so if you use the server in a production environment, the right way is to add /home/deb to httpd.conf as stated above.

If it is not a production server, or if you can get away with doing it (I.E your lazy and sys admin) you can use mount bind to sort it out, as that will just mount the directory as a mounted device, and apache will be none the wiser. As I stated, this (might) not be the correct way, but it can be useful sometimes, uses it for getting temporary access to dirs using Samba or FTP every now and then.

The command:
mount --bind /home/deb /var/www/html

Or for fstab
/home/deb            /var/www/html        auto    bind 0 0
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now