[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

ln

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
teera
Asked:
teera
  • 2
4 Solutions
 
pjedmondCommented:
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
 
xDamoxCommented:
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
 
pjedmondCommented:
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
 
bengtbjCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now