CentOS Apache Setting

Apache Install # yum -y install httpd* # /etc/rc.d/init.d/httpd start Apache Setting # vim /etc/httpd/conf/httpd.conf change Home Directory & Setting Virtual Host DirectoryIndex index.html index.html index.php . . <VirtualHost *:80> DocumentRoot /home/user ServerName * </VirtualHost> Add your custom host <VirtualHost proinlab.com> DocumentRoot /home/user ServerName proinlab.com ServerAlias www.proinlab.com </VirtualHost>  Permission Setting change ...

InetAddress를 이용한 특정 도메인의 IP 주소 구하기

www.google.com 의 IP 주소를 구하는 프로그램이다. import java.net.Inet4Address; import java.net.InetAddress; import java.net.UnknownHostException; public class InetAddress_01 { public static void main(String[] ar) throws Exception { String[] StrArr = GetIPAddressByName(); for (int i = 0; i < StrArr.length; i++) System.out.println("IP address : " + StrArr[i]); } public static String[] GetIPAddressByName() { InetAddress[] ia = null; ...