LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-25-2009, 09:10 PM   #1
weisdaclick
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
Trying To Browse Outside Document Root


Trying to solve this one:


Integrating a website with my billing agent, they suggest:


"Make a directory named 'data' outside the document root of your website
Your password file (.htpasswd) and others will be stored in this 'data' directory. You must create the data directory outside your web root"


Ok easy enough, but then they ask me for the details of this secured URL - so if I enter http://my_url/data/index.html this would become http://my_url/var/www/html/data/index.html

How do I get around this and get a browser to access my /data directory and not my /var/www/html/data directory?


Help appreciated.
 
Old 09-25-2009, 09:58 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
If it's outside of your documentroot, by definition browsers can't access it.
 
Old 09-26-2009, 01:55 AM   #3
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by weisdaclick View Post
Trying to solve this one:


Integrating a website with my billing agent, they suggest:


"Make a directory named 'data' outside the document root of your website
Your password file (.htpasswd) and others will be stored in this 'data' directory. You must create the data directory outside your web root"


Ok easy enough, but then they ask me for the details of this secured URL - so if I enter http://my_url/data/index.html this would become http://my_url/var/www/html/data/index.html

How do I get around this and get a browser to access my /data directory and not my /var/www/html/data directory?


Help appreciated.
You do this by specifying the desired directory path in httpd.conf. Like this:

Alias /server-directory-name /real/path/on/system

Any number of aliases can be specified this way.
 
Old 09-27-2009, 04:36 PM   #4
weisdaclick
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lutusp View Post
You do this by specifying the desired directory path in httpd.conf. Like this:

Alias /server-directory-name /real/path/on/system

Any number of aliases can be specified this way.

I had seen aliasing before, wondered if there was another way but you have answered my question.

Thanks !!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting the document root firaysinafets Ubuntu 2 04-07-2005 09:07 AM
VSFTPD - users can browse up to root t3___ Linux - Software 1 12-10-2004 01:24 PM
Document root on SSH kidestranged Linux - Software 1 01-22-2004 07:05 AM
Document Root in Apache Hal Linux - Newbie 2 10-28-2003 06:10 AM
Cannot Browse Website as Non Root bongski55 Slackware 5 08-20-2003 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration