Solved

Help with stripping a variable from Apache

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

15 Experts available now in Live!

Get 1:1 Help Now