※このサンプルの解説は、「CGIの扉」をすべて読み終えてる方を前提としています。
- 【Perlの環境変数取得】
-
※クッキーは自分自身の情報が見えてるだけで他人に見えるわけではありません。
CONTEXT_DOCUMENT_ROOT: /home/atompro.net/beginners/cgi-bin
CONTEXT_PREFIX: /cgi-bin
DOCUMENT_ROOT: /home/atompro.net/beginners/html
GATEWAY_INTERFACE: CGI/1.1
HTTPS: on
HTTP_ACCEPT: */*
HTTP_ACCEPT_ENCODING: gzip, br, zstd, deflate
HTTP_HOST: beginners.atompro.net
HTTP_USER_AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QUERY_STRING:
REDIRECT_HTTPS: on
REDIRECT_SSL_TLS_SNI: beginners.atompro.net
REDIRECT_STATUS: 200
REDIRECT_UNIQUE_ID: Zz8G58bGZMTEu@cpXncvhQAAAAE
REDIRECT_URL: /cgitest_getenv.cgi
REDIRECT_php_admin_value: open_basedir /home:/etc:/tmp:/usr:/root
REDIRECT_php_value: error_reporting 0
REMOTE_ADDR: 3.136.22.184
REMOTE_PORT: 62698
REQUEST_METHOD: GET
REQUEST_SCHEME: https
REQUEST_URI: /cgitest_getenv.cgi
SCRIPT_FILENAME: /home/atompro.net/beginners/cgi-bin/cgitest/getenv.cgi
SCRIPT_NAME: /cgi-bin/cgitest/getenv.cgi
SERVER_ADDR: 192.168.1.100
SERVER_ADMIN: root@localhost
SERVER_NAME: beginners.atompro.net
SERVER_PORT: 443
SERVER_PROTOCOL: HTTP/1.1
SERVER_SIGNATURE:
SERVER_SOFTWARE: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_auth_gssapi/1.5.1 mod_nss/1.0.14 NSS/3.28.4 mod_wsgi/3.4 Python/2.7.5 PHP/8.1.25
SSL_TLS_SNI: beginners.atompro.net
UNIQUE_ID: Zz8G58bGZMTEu@cpXncvhQAAAAE
php_admin_value: open_basedir /home:/etc:/tmp:/usr:/root