Solved

ln

Posted on 2006-07-10
4
424 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
[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
4 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 240 total points
ID: 17071789
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
ID: 17071857
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
ID: 17071953
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
ID: 17079376
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

688 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