标签:
网站物理路径查找思路
一、思想核心
找网站安装路径,即找Document Root 的位置,而Document Root最常见的地方就是 phpinfo.php 和httpd.conf中;
路径查找方向,可以大致分为以下2个方向:
(1) 找phpinfo
(2) 找httpd.conf
二、具体操作
1、通过phpinfo.php找到 Document Root 找到网站安装路径。即,想尽办法去找,爬行、爆破都可以;
常见的路径参考如下:
10.2.10.234/ 直接访问到 phpinfo.php
1.php
p.php
test.php
phpinfo.php
php_info.php
info.php
/xampp/phpinfo.php
2、通过apache的配置文件httpd.conf,找到Document Root指向的网络安装路径;
httpd.conf 路径分为Linux环境和windows环境下,文件位置不同。
(1) Linux 环境
Apache 配置文件默认路径:
/etc/httpd/conf/httpd.conf #RPM包安装
/usr/local/apache2/conf/httpd.conf #源码包安装
/usr/local/app/apache2/conf/httpd.conf #apache2缺省配置文件
/etc/httpd/conf/httpd.conf
/usr/local/apche/conf/httpd.conf
Apache配置文件常用路径:
/etc/httpd/conf/httpd.conf
/etc/apache/httpd.conf
/etc/apache2/httpd.conf
/usr/local/httpd/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/usr/local/apache2/conf/httpd.conf
/var/local/www/conf/httpd.conf
/var/www/conf/httpd.conf
/var/httpd/conf/httpd.conf
/opt/www/conf/httpd.conf
/apache/apache/conf/httpd.conf
/apache/apache2/conf/httpd.conf
/home/apache/conf/httpd.conf
/home/apache2/conf/httpd.conf
/www/conf/httpd.conf
/opt/lampp/etc/httpd.conf
(2)Windows 环境
1) APACHE+WIN2003
d:/APACHE/Apache2/conf/httpd.conf
2) IIS6.0+win2003 配置文件
C:/Windows/system32/inetsrv/metabase.xml
3) IIS7.0+WIN 配置文件
C:\Windows\System32\inetsrv\config\applicationHost.config
3、通过套件的默认安装位置,直接尝试网站安装路径;
(1)套件phpstudy
网站默认路径:/phpstudy/www 或者 D:/phpstudy/www
httpd.conf 默认路径:
(2)xampp套件
网站默认路径: D:/xampp/htdocs 或者 C:/xampp/htdocs
httpd.conf 默认路径: D/xampp/apache/conf/httpd.conf C:/xampp/apache/conf/httpd.conf
(3)LAMPP套件
网站默认路径:/opt/lampp/htdocs
http.conf 默认路径:/opt/lampp/etc/httpd.conf
(4)phpnow套件
(5)LNMP套件
网站默认路径:/home/wwwroot/default --- 目录可能有权限限制?
4、网站默认安装路径
/var/www/html/index.php
标签: