Created
January 22, 2012 11:20
-
-
Save koo5/1656624 to your computer and use it in GitHub Desktop.
list all aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><body><h1>It works!</h1> | |
<p>This is the default web page for this server.</p> | |
<p>The web server software is running but no content has been added, yet.</p> | |
<?php | |
$handle=opendir('/etc/apache2/conf.d'); | |
$it = array(); | |
while (false !== ($file = readdir($handle))) | |
{ | |
if(preg_match("/Alias \/([a-zA-Z0-9]*)?/", file_get_contents('/etc/apache2/conf.d/'.$file), $it)) | |
{ | |
echo "<a href=\"$it[1]\">$it[1]</a>"; | |
echo "<br>\n"; | |
} | |
} | |
closedir($handle); | |
?> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment