Solved

Help with stripping a variable from Apache

Posted on 2001-09-04
2
132 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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