filename 내용:
aaa.com
bbb.com
...
gen.php
<?
$handle = @fopen("filename", "r");
if ($handle) {
while (($buffer = fgets($handle, 4096)) !== false) {
$buffer = trim($buffer);
echo "<VirtualHost *:80>\n";
echo "\tServerName $buffer\n";
echo " \tServerAlias www.{$buffer}\n";
echo "\tDocumentRoot /var/www/vhosts/$buffer/httpdocs\n";
echo "CustomLog logs/$buffer-log common\n";
echo "ErrorLog logs/$buffer_error-log\n";
echo "</VritualHost>";
echo "\n";
}
if (!feof($handle)) {
echo "Error: unexpected fgets() fail\n";
}
fclose($handle);
}
?>
php gen.php > vhosts.conf
cat vhosts.conf >> /usr/local/apache/conf/vhosts.conf
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4050 | |
| 29 |
아우겐나이스
|
21년 전 | 4436 | |
| 28 |
아우겐나이스
|
21년 전 | 3465 | |
| 27 | 21년 전 | 5833 | ||
| 26 | 21년 전 | 3113 | ||
| 25 | 21년 전 | 6084 | ||
| 24 | 18년 전 | 3649 | ||
| 23 | 21년 전 | 3640 | ||
| 22 | 21년 전 | 4247 | ||
| 21 | 21년 전 | 3817 | ||
| 20 | 21년 전 | 4225 | ||
| 19 | 21년 전 | 6678 | ||
| 18 | 21년 전 | 4733 | ||
| 17 | 21년 전 | 6989 | ||
| 16 | 21년 전 | 4170 | ||
| 15 | 21년 전 | 2633 | ||
| 14 | 21년 전 | 4977 | ||
| 13 | 21년 전 | 3400 | ||
| 12 |
Recluse
|
21년 전 | 3881 | |
| 11 |
아우겐나이스
|
21년 전 | 3568 | |
| 10 |
Recluse
|
21년 전 | 3392 | |
| 9 | 21년 전 | 3992 | ||
| 8 | 21년 전 | 5171 | ||
| 7 | 21년 전 | 4761 | ||
| 6 | 21년 전 | 5686 | ||
| 5 | 21년 전 | 4114 | ||
| 4 | 21년 전 | 4840 | ||
| 3 | 21년 전 | 4740 | ||
| 2 | 21년 전 | 3244 | ||
| 1 | 22년 전 | 4341 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기