Solved

Web access to Linux directory outside public_html?

Posted on 2004-09-07
7
206 Views
Last Modified: 2010-04-22
I want to have a web user open an index.html file that is in a directory outside of the root directory for the website. (which I cannot move and do not what to copy)

For example, they would go to www.mydomain.com/stats (which would take them to /home/acctname/public_html) where they would find a symbolic link 'stats' pointing to /home/acctname/tmp/somedir where they would execute the index.html file there.

I symbolic link seems to work because I can 'cd stats' from /home/acctname/public_html and I change to the /home/acctname/tmp/somedir directory.

I also did a chmod a+rwx on the tmp directory and the index.html file there.

The problem is that I get a 404 error when going to www.mydomain.com/stats

Any suggestions?

Peter
Linux Newbie
0
Comment
Question by:pneuhaus
  • 2
  • 2
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12001946
If you are going to use a symlink the Options on the document root need to include FollowSymLinks, e.g.:

  <Directory />
    Options FollowSymLinks Multiviews
 ...

An alternatve to that is to specify an Alias for the site, like:

  Alias /stats "/home/acctname/tmp/somedir"
0
 

Author Comment

by:pneuhaus
ID: 12011591
Clarification please:

Am I to type  
  alias /stats "/home/acctname/tmp/somedir"
at the bash prompt while in the webroot of acctname?
Seems like I'm missing and equal sign.

neither worked.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 300 total points
ID: 12012242
"Alias /stats "/home/acctname/tmp/somedir"" is a directive that would be placed in the httpd.conf for this site.
0
 
LVL 5

Expert Comment

by:B1-66ER
ID: 13303497
to create symbol links use command "ld":

$ cd DIR_WITH_YOUR_INDEX.HTML
$ ln -s PATH_TO_INDEX_HTML_IN_ANOTHER_DIR ./index.html

now users in their brousers will see PATH_TO_INDEX_HTML_IN_ANOTHER_DIR
0
 
LVL 5

Expert Comment

by:B1-66ER
ID: 13303536
sorry!
i make mistake, i doesnt well read your question.
sorry aagain :)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

18 Experts available now in Live!

Get 1:1 Help Now