{"id":252,"date":"2026-04-06T12:32:39","date_gmt":"2026-04-06T03:32:39","guid":{"rendered":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=252"},"modified":"2026-04-06T12:32:39","modified_gmt":"2026-04-06T03:32:39","slug":"%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e3%81%abawstats-%e3%82%92%e8%a8%ad%e5%ae%9a","status":"publish","type":"page","link":"https:\/\/falcon21.space\/kazuya\/work\/?page_id=252","title":{"rendered":"\u30e6\u30fc\u30b6\u30fc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bawstats \u3092\u8a2d\u5b9a."},"content":{"rendered":"\n<p><strong>\u5404\u30e6\u30fc\u30b6\u30fc\uff08\u4f8b: username\uff09\u306b\u5bfe\u3057\u3066\u3001\u5c02\u7528\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/strong><br><br>#<strong>\u00a0\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc (\u4f8b: xxxxxx \u306e\u5834\u5408)<\/strong><br>sudo cp \/etc\/awstats\/awstats.model.conf \/etc\/awstats\/awstats.xxxxxx.conf<br>kazuya@falcon21:~$\u00a0<strong>sudo cp \/etc\/awstats\/awstats.model.conf \/etc\/awstats\/awstats.xxxxxxa.conf<\/strong><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><br><strong>\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb (\/etc\/awstats\/awstats.user1.conf) \u3092\u7de8\u96c6<\/strong><br>kazuya@falcon21:~$\u00a0<strong>sudo vi \/etc\/awstats\/awstats.xxxxxx.conf<\/strong><br><br># &#8212; \/etc\/awstats\/awstats.user1.conf &#8212;<br># 1. \u30b5\u30a4\u30c8\u306e\u30db\u30b9\u30c8\u540d (\u8b58\u5225\u7528)<br>SiteName=&#8221;user1.example.com&#8221;<br>158\u00a0<strong>SiteDomain=&#8221;xxxxxx.falcon21.space<\/strong><br><br><br># 2. \u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9 (\u30e6\u30fc\u30b6\u30fc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u3092\u6307\u5b9a)<br><strong>LogFile=&#8221;\/home\/user1\/logs\/access_log&#8221; # \u203b\u5404\u81ea\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u308b<\/strong><br>50 #LogFile=&#8221;\/var\/log\/httpd\/mylog.log&#8221;<br>51<strong>\u00a0LogFile=&#8221;\/home\/<strong>xxxxxx<\/strong>\/logs\/access_log&#8221;<\/strong><br><br># 3. \u30ed\u30b0\u306e\u5f62\u5f0f (\u901a\u5e38\u306f1)<br>LogFormat=1<br><br># 4. \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4fdd\u5b58\u5148 (\u5404\u30e6\u30fc\u30b6\u30fc\u304c\u66f8\u304d\u8fbc\u3081\u308b\u5834\u6240)<br>DirData=&#8221;\/home\/user1\/awstats&#8221;<br>224\u00a0<strong>DirData=&#8221;\/home\/<strong>xxxxxx<\/strong>\/awstats&#8221;<\/strong><br><br># 5. AWStats\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3042\u308b\u5834\u6240 (\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u4f9d\u5b58)<br>DirCgi=&#8221;\/cgi-bin\/&#8221;<br>DirIcons=&#8221;\/awstats-icons&#8221;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br><br>\u203b<strong>&nbsp;\u91cd\u8981: DirData \u3067\u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea (\/home\/user1\/awstats) \u3092\u4f5c\u6210\u3057\u3001Apache\u306e\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\uff08apache \u307e\u305f\u306f www-data\uff09\u304c\u66f8\u304d\u8fbc\u3081\u308b\u3088\u3046\u306b\u3059\u308b<\/strong><br>mkdir \/home\/user1\/awstats<br>chown apache:apache \/home\/user1\/awstats # CentOS\u306e\u5834\u5408<br># chown www-data:www-data \/home\/user1\/awstats # Ubuntu\u306e\u5834\u5408<br><br>[root@falcon21 ~]#&nbsp;<strong>mkdir \/home\/kazuya\/awstats<\/strong><br>[root@falcon21 ~]#&nbsp;<strong>chown apache:apache \/home\/kazuya\/awstats<\/strong><br><br>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br>3.<strong>&nbsp;\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u8a2d\u5b9a<\/strong><br>\u3000\u3000\u3000<br><strong>\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306e\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u901a\u5e38 apache \u30e6\u30fc\u30b6\u30fc\u304c\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093<\/strong>\u3002<br>\u30ed\u30b0\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff08logrotate\uff09\u306e\u8a2d\u5b9a\u3067\u3001\u8aad\u307f\u53d6\u308a\u6a29\u9650\u304c\u4ed8\u4e0e\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>\/etc\/logrotate.d\/httpd (\u307e\u305f\u306f apache2) \u3092\u7de8\u96c6\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30ed\u30b0\u306b\u5bfe\u3059\u308b\u6a29\u9650\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><br>[root@falcon21 ~]#<strong>\u00a0vi \/etc\/logrotate.d\/httpd<\/strong><br>#\u6700\u5f8c\u5c3e\u306b\u8ffd\u52a0 <br>17 \/home\/kazuya\/logs\/access_log { <br>18 missingok <br>19 create 0644 <strong>xxxxxx<\/strong> apache <br>20 sharedscripts <br>21 postrotate <br>22\u3000\u3000 \/sbin\/service httpd reload > \/dev\/null 2>\/dev\/null || true<br> 23 endscript <br>24 } <br>25<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Apache \u306e\u8a2d\u5b9a (Web\u95b2\u89a7\u7528)<\/strong><br>\u30e6\u30fc\u30b6\u30fc\u304c\u30d6\u30e9\u30a6\u30b6\u304b\u3089 http:\/\/example.com\/~user1\/awstats\/awstats.pl \u3067\u78ba\u8a8d\u3067\u304d\u308b\u3088\u3046\u306b\u3001Apache \u306e\u30a8\u30a4\u30ea\u30a2\u30b9\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<br>\/etc\/httpd\/conf.d\/awstats.conf (Ubuntu\u306f \/etc\/apache2\/conf-enabled\/awstats.conf) \u306b\u4ee5\u4e0b\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>almalix10 \u3067\u306f\u3001<strong>AWStats files have been installed in \/usr\/local\/awstats<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><br>[root@falcon21 ~]#&nbsp;<strong>vi \/etc\/httpd\/conf.d\/awstats.conf<\/strong><br>#\u6700\u5f8c\u5c3e\u306b\u8ffd\u52a0<br><br># AWStats\u306eCGI\u30b9\u30af\u30ea\u30d7\u30c8\u3078\u306e\u30a2\u30af\u30bb\u30b9\u8a2d\u5b9a<br>ScriptAlias \/awstats\/ \/usr\/local\/awstats\/wwwroot\/cgi-bin\/<br>&lt;Directory &#8220;\/usr\/local\/awstats\/wwwroot\/cgi-bin\/&#8221;&gt;<br>Options None<br>AllowOverride None<br>Order allow,deny<br>Allow from all<br># \u5fc5\u8981\u306b\u5fdc\u3058\u3066Basic\u8a8d\u8a3c\u3092\u5165\u308c\u308b<br>AuthType Basic<br># AuthName &#8220;Restricted&#8221;<br># AuthUserFile \/etc\/awstats\/.htpasswd<br># Require valid-user<br>&lt;\/Directory&gt;<br><br># \u30a2\u30a4\u30b3\u30f3\u3078\u306e\u30a8\u30a4\u30ea\u30a2\u30b9<br>Alias \/awstats-icons\/ \/usr\/local\/awstats\/wwwroot\/icon\/<br>&lt;Directory &#8220;\/usr\/local\/awstats\/wwwroot\/icon\/&#8221;&gt;<br>Options None<br>AllowOverride None<br>Order allow,deny<br>Allow from all<br>&lt;\/Directory&gt;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><br><strong>\u8a2d\u5b9a\u53cd\u6620\u306e\u305f\u3081\u3001Apache\u3092\u518d\u8d77\u52d5<\/strong><br>[root@falcon21 ~]#\u00a0<strong>systemctl restart httpd<\/strong><br><br><br><strong>\u624b\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3068\u52d5\u4f5c\u78ba\u8a8d<\/strong><br>\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3057\u3066\u8868\u793a\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br><br>#\u00a0<strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0<\/strong><br>sudo \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=<strong>xxxxxx<\/strong> -update<br>\u30d6\u30e9\u30a6\u30b6\u3067\u4ee5\u4e0b\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<br><br>[root@falcon21 ~]#\u00a0<strong>\/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=<strong>xxxxxx<\/strong>-update<\/strong><br>Create\/Update database for config &#8220;\/etc\/awstats\/awstats.<strong>xxxxxx<\/strong>.conf&#8221; by AWStats version 8.0 (build 20240604)<br>From data in log file &#8220;\/home\/<strong>xxxxxx<\/strong>\/logs\/access_log&#8221;&#8230;<br>Phase 1 : First bypass old records, searching new record&#8230;<br>Searching new records from beginning of log file&#8230;<br>Jumped lines in file: 0<br>Parsed lines in file: 1<br>Found 0 dropped records,<br>Found 1 comments,<br>Found 0 blank records,<br>Found 0 corrupted records,<br>Found 0 old records,<br>Found 0 new qualified records.<br><br><br>\u3000<strong>http:\/\/falcon21.space\/awstats\/awstats.pl?config=<strong>xxxxxx<\/strong><\/strong>\u3000\u3078\u30a2\u30af\u30bb\u30b9<br><br><br><strong>\u30af\u30ed\u30f3\u306b\u3088\u308b\u81ea\u52d5\u5316<\/strong><br>\u81ea\u52d5\u66f4\u65b0\u3055\u308c\u308b\u3088\u3046\u306bcron\u3092\u8a2d\u5b9a\u3057\u307e\u3059\uff08\/etc\/cron.d\/awstats \u306b\u8ffd\u8a18\uff09\u3002<br>\u53c8\u306f\u3001crontab -e<br>[root@falcon21 ~]#\u00a0<strong>crontab -e<\/strong><br><strong>*\/30 * * * * perl \/usr\/local\/awstats\/wwwroot\/cgi-bin\/awstats.pl -config=<strong>xxxxxx<\/strong> -update > \/dev\/null<\/strong><br>crontab: installing new crontab<br>Backup of root&#8217;s previous crontab saved to \/root\/.cache\/crontab\/crontab.bak<br><br>&#8212;&#8212;&#8212;&#8212;&#8212;-<br><br>\u6ce8\u610f\u70b9<br>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3:\u00a0<strong>\u30e6\u30fc\u30b6\u30fc\u3054\u3068\u306e\u30a2\u30af\u30bb\u30b9\u89e3\u6790\u753b\u9762\u306b\u306f\u5fc5\u305aBasic\u8a8d\u8a3c<\/strong>\u3092\u304b\u3051\u3066\u304f\u3060\u3055\u3044\u3002<br>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb: \/home\/user1\/logs\/access_log \u304c\u5b58\u5728\u3057\u3001Apache\u304c\u66f8\u304d\u8fbc\u3081\u308b\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br><br>\u591a\u30e6\u30fc\u30b6\u30fc: \u30e6\u30fc\u30b6\u30fc\u304c\u5897\u3048\u308b\u305f\u3073\u306b\u3001\u624b\u98062\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210\u3068\u3001\u624b\u98063\u306e\u30ed\u30b0\u6a29\u9650\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059<br><br><br>***********************************************************************<br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5404\u30e6\u30fc\u30b6\u30fc\uff08\u4f8b: username\uff09\u306b\u5bfe\u3057\u3066\u3001\u5c02\u7528\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210 #\u00a0\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u30b3\u30d4\u30fc (\u4f8b: xxxxxx \u306e\u5834\u5408)sudo cp \/etc\/awstats\/awstats.model.conf \/etc\/a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-252","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252"}],"version-history":[{"count":1,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/252\/revisions"}],"predecessor-version":[{"id":253,"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=\/wp\/v2\/pages\/252\/revisions\/253"}],"wp:attachment":[{"href":"https:\/\/falcon21.space\/kazuya\/work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}