Solved

ln

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

932 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

12 Experts available now in Live!

Get 1:1 Help Now