View httpd.conf through web browser

mazhar_shaikh

Registered
Apr 22, 2006
3
0
151
Hello,

How can we see httpd.conf through web browser. I am using this script. I am using mozilla firefox and Internet Explorer.

========================================

<?php
$handle = fopen("/usr/local/apache/conf/httpd.conf", "r");
echo $handle;
?>

========================================

Any idea?
 

thomasking

Registered
May 29, 2006
2
0
151
This file is owned by the system's root user and by default it does not have the proper permissions for a php script to open for reading. If you want to see the file and are on a shared web server, ask your web host provider for a copy - they may or may not do so, though.
 
Last edited:

rhenderson

Well-Known Member
Apr 21, 2005
785
2
168
Oklahoma
cPanel Access Level
Root Administrator
mazhar_shaikh said:
Hello,

How can we see httpd.conf through web browser. I am using this script. I am using mozilla firefox and Internet Explorer.

========================================

<?php
$handle = fopen("/usr/local/apache/conf/httpd.conf", "r");
echo $handle;
?>

========================================

Any idea?

There are a couple of WHM file managers out there, we use the one from http://configserver.com/ You can then edit all the files via a web browser.
 

dave9000

Well-Known Member
Apr 7, 2003
891
1
168
arkansas
cPanel Access Level
Root Administrator
the httpd.conf is 0600 root:root permissions so unless you have root access your not going to be able to view,edit or do anything else with the httpd.conf