Solved

Help with stripping a variable from Apache

Posted on 2001-09-04
2
131 Views
Last Modified: 2010-03-04
Hello,
Can anyone help. I am trying to strip an environment variable from Apache webserver. It is DOCUMENT_ROOT.
Basically I need to get the value of DOCUMENT_ROOT which will be something like /home/username...this will then be used in a cgi script to read a log from the users home directory. There is only one cgi script that is called and it will look up the log from the location that it is called from. ie www.this_example.com equates to /home/xyz
So when the script is called it will look up the log from /home/xyz
Likewise from /home/abc
gets the logs from /home/abc and so on. So the cgi script will refer back to where it is being called from. It will be kept as one single script in a cgi-bin for security reasons.
0
Comment
Question by:j1mlondon
2 Comments
 
LVL 1

Accepted Solution

by:
Zook earned 100 total points
ID: 6463336
If I got your question right, then you don't have a problem. Just use the appropriate Shellvariable in your script. Apache will have set it when you script is called!?

What didn't I get?

cu
Zook
0
 

Author Comment

by:j1mlondon
ID: 6463867
I couldn't get what I wanted using a simple print content type : text/html etc...so how do I get the variable for DOCUMENT_ROOT's value?
I just need to run a diff. script with that value inserted.
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

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now