Solved

Web access to Linux directory outside public_html?

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

​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 …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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