Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed lighttpd with fast-cgi. Then I installed webmin. It appears webmin has taken over the lighttpd install and changed the PHP configuration to add a bunch of their own environment variables that I really do not want exposed to regular websites running on the server. For example:

Surfing up to http:///index.php and printing out phpinfo()

DOCUMENT_REALROOT  /usr/libexec/webmin
DOCUMENT_ROOT      /usr/libexec/webmin
SERVER_REALROOT    /usr/libexec/webmin
HTTP_REFERER       https://<SERVERIP>:10000/init/edit_action.cgi?0+lighttpd
QUERY_STRING       file=%2Fetc%2Frc%2Ed%2Finit%2Ed%2Flighttpd&name=lighttpd&restart=1&back=edit%5Faction%2Ecgi%3F0%2Blighttpd

So basically, my question is how to get webmin out of the regular lighttpd port 80 configuration and only have it stick all that stuff in if you actually surf up to the webmin port 10000. Specifically, HTTP_REFERER and QUERY_STRING are giving me trouble because those are used for stats and configurations.

share|improve this question

closed as off-topic by HopelessN00b Jan 14 '15 at 2:15

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 14 '15 at 2:15

This doesn't make sense.

Edit: Actually, looking at this, this is not even a PHP thing. This is a Webmin page. PHP isn't even involved in the request you're looking at. Where are you getting this data? It's not from the request to index.php. It's for a request to the Webmin init module where you were changing the state of the lighty initscript.

My original reply didn't take into account that your data is simply not what you think it is. PHP and lighty are not involved in the request you're looking at, at all.

share|improve this answer

Webmin is written in Perl and uses its own built-in webserver. I never saw it do anything to other web servers configuration. What is the system you're using? Did you install some webmin package for your distro or the official distribution?

share|improve this answer
Centos 5.5. Just did a regular yum install of the packages – John P Dec 15 '10 at 18:44
My guess is that the centos package is broken... remove it and install manually the version. It will be more current and probably won't interfere with your web server. – wazoox Dec 15 '10 at 20:08
There is no stock CentOS package. I assume he means the RPM from the yum repo, which would definitely not do what he's described. (Webmin doesn't even know of the existence of lighty! It's definitely not going to change its configuration files.) – swelljoe Dec 15 '10 at 22:03
It acts like it is proxying all HTTP requests through webmin. Notice the HTTP_REFERER points back to the webmin port. I did not see anything unusual with IPTABLES, but it might be done if a different place – John P Dec 15 '10 at 23:05
Webmin's has no proxy functionality, so that theory is right out. ;-) It would be possible to run PHP scripts as cgi scripts under the Webmin server, but it wouldn't happen accidentally. Again, I believe you are looking at a wholly non-PHP request, all of this data is about an interaction with Webmin. No PHP or light involved at all. – swelljoe Dec 16 '10 at 20:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.