Solved

ln

Posted on 2006-07-10
4
402 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
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

815 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

8 Experts available now in Live!

Get 1:1 Help Now