| はじめての自宅サーバ構築 - Fedora/CentOS - | Last Update | 2008/05/16 | |
| It opened to 2004/09/19. 当サイトはFedora9で運用しています |
Visitors Pageviews Today(IP/PV) |
3,251,074 12,000,182 1,543/8,839 |
|
デルではおとくなキャンペーン実施中! |
レノボ Web 広告限定ストア(キャンペーン&新着情報) |
telnetでWebサーバのポート"80"にアクセス # telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. コマンド入力 ECHO <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>ECHO to / not supported.<br /> </p> <hr /> サーバ情報が表示されている <address>Apache/2.2.3 (Fedora) Server at kajuhome.com Port 80</address> </body></html> Connection closed by foreign host. apache設定ファイルの編集 # vi /etc/httpd/conf/httpd.conf # # Don't give away too much information about all the subcomponents # we are running. Comment out this line if you don't mind remote sites # finding out what major optional modules you are running ServerTokens Prod # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature Off Webサーバ(apache)の再起動 # /etc/rc.d/init.d/httpd restart httpdを停止中: [ OK ] httpd を起動中: [ OK ] telnetでWebサーバのポート"80"にアクセス # telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. コマンド入力 ECHO <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>501 Method Not Implemented</title> </head><body> <h1>Method Not Implemented</h1> <p>ECHO to / not supported.<br /> </p> サーバ情報が非表示になった </body></html> Connection closed by foreign host. |
telnetでWebサーバのポート"80"にアクセス
# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
コマンド入力
HEAD /test.php HTTP/1.0
<-- もう一度、空エンター押下
HTTP/1.1 200 OK
Date: Mon, 19 Nov 2007 07:39:56 GMT
Server: Apache
phpのバージョン情報が表示されている
X-Powered-By: PHP/5.2.4
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: text/html
Connection closed by foreign host.
php設定ファイルの編集
# vi /etc/php.ini
;
; Misc
;
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
expose_php = Off
Webサーバ(apache)の再起動
# /etc/rc.d/init.d/httpd restart
httpdを停止中: [ OK ]
httpd を起動中: [ OK ]
telnetでWebサーバのポート"80"にアクセス
# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
コマンド入力
HEAD /test.php HTTP/1.0
<-- もう一度、空エンター押下
HTTP/1.1 200 OK
Date: Mon, 19 Nov 2007 07:40:44 GMT
Server: Apache
サーバ情報が非表示になった
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: text/html
Connection closed by foreign host.
|
telnetでMailサーバのsmtpポート"25"にアクセス # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. サーバ情報が表示されている 220 kajuhome.com ESMTP Postfix (2.0.18) ctrl + "]"を押してターミナルを抜ける ^] telenetの終了 telnet> quit Connection closed. postfix設定ファイルの編集 # vi /etc/postfix/main.cf # SHOW SOFTWARE VERSION OR NOT # # The smtpd_banner parameter specifies the text that follows the 220 # code in the SMTP server's greeting banner. Some people like to see # the mail version advertised. By default, Postfix shows no version. # # You MUST specify $myhostname at the start of the text. That is an # RFC requirement. Postfix itself does not care. # #smtpd_banner = $myhostname ESMTP $mail_name #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) smtpd_banner = $myhostname ESMTP Mailサーバ(postfix)の再起動 # /etc/rc.d/init.d/postfix restart Shutting down postfix: [ OK ] Starting postfix: [ OK ] # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. サーバ情報が非表示になった 220 kajuhome.com ESMTP ctrl + "]"を押してターミナルを抜ける ^] telenetの終了 telnet> quit Connection closed. |
DNSサーバ情報確認
# dig @localhost chaos txt version.bind
; <<>> DiG 9.2.3 <<>> @localhost chaos txt version.bind
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51352
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;version.bind. CH TXT
;; ANSWER SECTION:
サーバ情報が表示されている
version.bind. 0 CH TXT "9.2.3"
;; Query time: 34 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Thu Oct 28 12:09:48 2004
;; MSG SIZE rcvd: 48
bind設定ファイルの編集
# vi /etc/named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
以下の行を追加する
version "unknown";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
DNSサーバ(bind)の再起動
# /etc/rc.d/init.d/named restart
namedを停止中: [ OK ]
named を起動中: [ OK ]
DNSサーバ情報確認
# dig @localhost chaos txt version.bind
; <<>> DiG 9.2.3 <<>> @localhost chaos txt version.bind
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58074
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;version.bind. CH TXT
;; ANSWER SECTION:
サーバ情報が非表示になった
version.bind. 0 CH TXT "unknown"
;; Query time: 29 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Thu Oct 28 12:17:03 2004
;; MSG SIZE rcvd: 50
|