Solved

Help with stripping a variable from Apache

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 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