Solved

Web access to Linux directory outside public_html?

Posted on 2004-09-07
7
215 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 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

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

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
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

707 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