Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Web access to Linux directory outside public_html?

Posted on 2004-09-07
7
Medium Priority
?
218 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
[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
  • 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 1200 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

Independent Software Vendors: 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!

Question has a verified solution.

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

BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Fine Tune your automatic Updates for Ubuntu / Debian
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

597 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