pneuhaus
asked on
Web access to Linux directory outside public_html?
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
For example, they would go to www.mydomain.com/stats (which would take them to /home/acctname/public_html
I symbolic link seems to work because I can 'cd stats' from /home/acctname/public_html
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
ASKER
Clarification please:
Am I to type
alias /stats "/home/acctname/tmp/somedi r"
at the bash prompt while in the webroot of acctname?
Seems like I'm missing and equal sign.
neither worked.
Am I to type
alias /stats "/home/acctname/tmp/somedi
at the bash prompt while in the webroot of acctname?
Seems like I'm missing and equal sign.
neither worked.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
to create symbol links use command "ld":
$ cd DIR_WITH_YOUR_INDEX.HTML
$ ln -s PATH_TO_INDEX_HTML_IN_ANOT HER_DIR ./index.html
now users in their brousers will see PATH_TO_INDEX_HTML_IN_ANOT HER_DIR
$ cd DIR_WITH_YOUR_INDEX.HTML
$ ln -s PATH_TO_INDEX_HTML_IN_ANOT
now users in their brousers will see PATH_TO_INDEX_HTML_IN_ANOT
sorry!
i make mistake, i doesnt well read your question.
sorry aagain :)
i make mistake, i doesnt well read your question.
sorry aagain :)
<Directory />
Options FollowSymLinks Multiviews
...
An alternatve to that is to specify an Alias for the site, like:
Alias /stats "/home/acctname/tmp/somedi