{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/apahce-httpd/feed/json -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/apahce-httpd", "feed_url": "https://matoken.org/blog/tag/apahce-httpd/feed/json", "language": "ja", "title": "apahce httpd – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "http://matoken.org/blog/?p=3715", "url": "https://matoken.org/blog/2022/07/12/apache-httpd-2-4-return-503/", "title": "Apache httpd 2.4\u3067\u3082503\u3092\u8fd4\u3059\u3088\u3046\u306b\u3059\u308b", "content_html": "
\n

\u81ea\u5b85\u30b5\u30fc\u30d0\u304c\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u305f\u306e\u3067Lighttpd\u3067\u5168\u30da\u30fc\u30b8503\u3092\u8fd4\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n

Lighttpd\u3067\u5168\u30da\u30fc\u30b8503\u3092\u8fd4\u3059 \u2013 matoken\u2019s meme

\n
\n
\n

\u601d\u3063\u305f\u3088\u308a\u30a2\u30af\u30bb\u30b9\u304c\u591a\u3044\u306e\u3067\u30a2\u30af\u30bb\u30b9\u306e\u591a\u3044\u30c9\u30e1\u30a4\u30f3\u306eDNS\u3092\u5909\u66f4\u3057\u3066\u5916\u306e\u30b5\u30fc\u30d0\u306b\u5411\u3051\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\uff0e
\n\u3053\u306e\u30b5\u30fc\u30d0\u306fApache httpd\u304c\u52d5\u3044\u3066\u3044\u308b\u306e\u3067Lighttpd\u3068\u540c\u3058\u8a2d\u5b9a\u306f\u4f7f\u3048\u306a\u3044\u306e\u3067\u5c11\u3057\u8abf\u3079\u3066\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n

\n
\n

\u5bfe\u8c61\u30c9\u30e1\u30a4\u30f3\u306e\u8a2d\u5b9a\u3092\u4f5c\u6210\uff0e\u3053\u3053\u3067\u306f\u300c sub1.example.org \u300d\u3068\u3057\u3066\u3044\u307e\u3059\uff0e

\n
\n
\n
`/etc/apache2/sites-enabled/090-sub1.example.org.conf
\n
\n
<VirtualHost *:80>\n        ServerName sub1.example.org\n        Redirect permanent / https://sub1.example.org/\n</VirtualHost>\n<IfModule mod_ssl.c>\n<VirtualHost *:443>\n        ServerName sub1.example.org\n        ServerAdmin webmaster@example.org\n        DocumentRoot /var/www/sub1.example.org/\n        RedirectMatch 503 ^/(?!503\\.html) (1)\n        ErrorDocument 503 /503.html\n        ErrorLog ${APACHE_LOG_DIR}/error_sub1.example.org.log\n        CustomLog ${APACHE_LOG_DIR}/access_sub1.example.org.log combined\n        SSLCertificateFile /etc/letsencrypt/live/sub1.example.org/fullchain.pem\n        SSLCertificateKeyFile /etc/letsencrypt/live/sub1.example.org/privkey.pem\n</VirtualHost>\n</IfModule>
\n
\n
\n
\n
    \n
  1. \u3059\u3079\u3066\u306eURL\u3092 /503.html \u306b\u8ee2\u9001\u3057\u307e\u3059\uff0e
  2. \n
\n
\n
\n

\u5bfe\u8c61\u30c9\u30e1\u30a4\u30f3\u306e\u8a3c\u660e\u66f8\u3092\u65e7\u30b5\u30fc\u30d0\u304b\u3089\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3059\uff0e

\n
\n
\n
\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210
\n
\n
$ sudo mkdir -p /etc/letsencrypt/tmp/sub1.example.org/
\n
\n
\n
\n

\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u306e /etc/letsencrypt/live/sub1.example.org/fullchain.pem \u3068 /etc/letsencrypt/live/sub1.example.org/privkey.pem \u3092 /etc/letsencrypt/tmp/sub1.example.org/ \u4ee5\u4e0b\u306b\u7f6e\u304f\uff0e

\n
\n
\n
\u6a29\u9650\u8a2d\u5b9a\u3057\u3066\u30ea\u30f3\u30af\u3092\u8cbc\u308a\u307e\u3059\uff0e
\n
\n
$ sudo chown -R root.ssl-cert /etc/letsencrypt\n$ sudo ln -s /etc/letsencrypt/tmp/sub1.example.org/fullchain.pem /etc/letsencrypt/live/sub1.example.org/fullchain.pem\n$ sudo ln -s /etc/letsencrypt/tmp/sub1.example.org/privkey.pem /etc/letsencrypt/live/sub1.example.org/privkey.pem
\n
\n
\n
\n

503\u7528\u306ehtml\u3092\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\uff0e

\n
\n
\n
\n
$ sudo -u www-data mkdir /var/www/sub1.example.org\n$ sudo -u www-data vi /var/www/sub1.example.org/503.html
\n
\n
\n
\n

apache httpd\u518d\u8d77\u52d5

\n
\n
\n
\n
$ sudo service apache2 restart
\n
\n
\n
\n

DNS\u66f8\u304d\u63db\u3048\u524d\u306b\u691c\u8a3c\u306e\u884c\u3048\u308b\u30ed\u30fc\u30ab\u30eb\u306ePC\u306ehosts\u66f8\u304d\u63db\u3048\u3066\u52d5\u4f5c\u30c6\u30b9\u30c8\uff0e

\n
\n
\n
\n
$ echo \"192.0.2.5 sub1.example.org\" | sudo tee -a /etc/hosts (1)\n$ w3m -dump_head head http://sub1.example.org/piyo | grep ^HTTP/ (2)\nHTTP/1.1 503 Service Unavailable\n$ w3m -dump_extra head http://sub1.example.org/piyo | lv (3)
\n
\n
\n
\n
    \n
  1. \u65b0\u3057\u3044\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3059\u308b\uff0e
  2. \n
  3. 503\u304c\u5e30\u3063\u3066\u304f\u308b\u3053\u3068\u3092\u78ba\u8a8d
  4. \n
  5. \u8a3c\u660e\u66f8\u3082\u78ba\u8a8d
  6. \n
\n
\n
\n

\u52d5\u4f5c\u78ba\u8a8d\u304c\u51fa\u6765\u305f\u3089 /etc/hosts \u3092\u623b\u3057\u3066\u304a\u304f\uff0e

\n
\n
\n

\u3053\u306e\u5f8c\uff0cDNS\u66f8\u304d\u63db\u3048\u3092\u884c\u3044DNS\u304c\u4f1d\u64ad\u3057\u3066\u304b\u3089\u518d\u5ea6\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\uff0e

\n
\n
\n

\u5bfe\u8c61\u30c9\u30e1\u30a4\u30f3\u306eSSL\u8a3c\u660e\u66f8\u66f4\u65b0\u3082\u3057\u3066\u304a\u304f\uff0e

\n
\n
\n
\n
$ sudo certbot certonly -d sub1.example.org
\n
\n
\n
\n

\u3068\u3044\u3046\u611f\u3058\u3067\u30b5\u30fc\u30d0\u79fb\u884c\u3057\u307e\u3057\u305f\uff0e
\n\u305d\u308c\u307e\u3067\u81ea\u5b85\u306b9000\u30a2\u30af\u30bb\u30b9\u307b\u3069\u6709\u308a\u307e\u3057\u305f\u304c8500\u7a0b\u306f\u5916\u306e\u30b5\u30fc\u30d0\u306b\u884c\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e

\n
\n
\n
\u74b0\u5883
\n
\n
$ dpkg-query -W apache2 certbot\napache2 2.4.38-3+deb10u7\ncertbot 0.31.0-1+deb10u1\n$ lsb_release -dr\nDescription:    Debian GNU/Linux 10 (buster)\nRelease:        10\n$ arch\nx86_64
\n
\n
\n", "content_text": "\u81ea\u5b85\u30b5\u30fc\u30d0\u304c\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u305f\u306e\u3067Lighttpd\u3067\u5168\u30da\u30fc\u30b8503\u3092\u8fd4\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u305f\uff0e\n\n\nLighttpd\u3067\u5168\u30da\u30fc\u30b8503\u3092\u8fd4\u3059 \u2013 matoken\u2019s meme\n\n\n\u601d\u3063\u305f\u3088\u308a\u30a2\u30af\u30bb\u30b9\u304c\u591a\u3044\u306e\u3067\u30a2\u30af\u30bb\u30b9\u306e\u591a\u3044\u30c9\u30e1\u30a4\u30f3\u306eDNS\u3092\u5909\u66f4\u3057\u3066\u5916\u306e\u30b5\u30fc\u30d0\u306b\u5411\u3051\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\uff0e\n\u3053\u306e\u30b5\u30fc\u30d0\u306fApache httpd\u304c\u52d5\u3044\u3066\u3044\u308b\u306e\u3067Lighttpd\u3068\u540c\u3058\u8a2d\u5b9a\u306f\u4f7f\u3048\u306a\u3044\u306e\u3067\u5c11\u3057\u8abf\u3079\u3066\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n\u5bfe\u8c61\u30c9\u30e1\u30a4\u30f3\u306e\u8a2d\u5b9a\u3092\u4f5c\u6210\uff0e\u3053\u3053\u3067\u306f\u300c sub1.example.org \u300d\u3068\u3057\u3066\u3044\u307e\u3059\uff0e\n\n\n`/etc/apache2/sites-enabled/090-sub1.example.org.conf\n\n<VirtualHost *:80>\n ServerName sub1.example.org\n Redirect permanent / https://sub1.example.org/\n</VirtualHost>\n<IfModule mod_ssl.c>\n<VirtualHost *:443>\n ServerName sub1.example.org\n ServerAdmin webmaster@example.org\n DocumentRoot /var/www/sub1.example.org/\n RedirectMatch 503 ^/(?!503\\.html) (1)\n ErrorDocument 503 /503.html\n ErrorLog ${APACHE_LOG_DIR}/error_sub1.example.org.log\n CustomLog ${APACHE_LOG_DIR}/access_sub1.example.org.log combined\n SSLCertificateFile /etc/letsencrypt/live/sub1.example.org/fullchain.pem\n SSLCertificateKeyFile /etc/letsencrypt/live/sub1.example.org/privkey.pem\n</VirtualHost>\n</IfModule>\n\n\n\n\n\u3059\u3079\u3066\u306eURL\u3092 /503.html \u306b\u8ee2\u9001\u3057\u307e\u3059\uff0e\n\n\n\n\u5bfe\u8c61\u30c9\u30e1\u30a4\u30f3\u306e\u8a3c\u660e\u66f8\u3092\u65e7\u30b5\u30fc\u30d0\u304b\u3089\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3059\uff0e\n\n\n\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210\n\n$ sudo mkdir -p /etc/letsencrypt/tmp/sub1.example.org/\n\n\n\n\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u306e /etc/letsencrypt/live/sub1.example.org/fullchain.pem \u3068 /etc/letsencrypt/live/sub1.example.org/privkey.pem \u3092 /etc/letsencrypt/tmp/sub1.example.org/ \u4ee5\u4e0b\u306b\u7f6e\u304f\uff0e\n\n\n\u6a29\u9650\u8a2d\u5b9a\u3057\u3066\u30ea\u30f3\u30af\u3092\u8cbc\u308a\u307e\u3059\uff0e\n\n$ sudo chown -R root.ssl-cert /etc/letsencrypt\n$ sudo ln -s /etc/letsencrypt/tmp/sub1.example.org/fullchain.pem /etc/letsencrypt/live/sub1.example.org/fullchain.pem\n$ sudo ln -s /etc/letsencrypt/tmp/sub1.example.org/privkey.pem /etc/letsencrypt/live/sub1.example.org/privkey.pem\n\n\n\n503\u7528\u306ehtml\u3092\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\uff0e\n\n\n\n$ sudo -u www-data mkdir /var/www/sub1.example.org\n$ sudo -u www-data vi /var/www/sub1.example.org/503.html\n\n\n\napache httpd\u518d\u8d77\u52d5\n\n\n\n$ sudo service apache2 restart\n\n\n\nDNS\u66f8\u304d\u63db\u3048\u524d\u306b\u691c\u8a3c\u306e\u884c\u3048\u308b\u30ed\u30fc\u30ab\u30eb\u306ePC\u306ehosts\u66f8\u304d\u63db\u3048\u3066\u52d5\u4f5c\u30c6\u30b9\u30c8\uff0e\n\n\n\n$ echo \"192.0.2.5 sub1.example.org\" | sudo tee -a /etc/hosts (1)\n$ w3m -dump_head head http://sub1.example.org/piyo | grep ^HTTP/ (2)\nHTTP/1.1 503 Service Unavailable\n$ w3m -dump_extra head http://sub1.example.org/piyo | lv (3)\n\n\n\n\n\u65b0\u3057\u3044\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3059\u308b\uff0e\n503\u304c\u5e30\u3063\u3066\u304f\u308b\u3053\u3068\u3092\u78ba\u8a8d\n\u8a3c\u660e\u66f8\u3082\u78ba\u8a8d\n\n\n\n\u52d5\u4f5c\u78ba\u8a8d\u304c\u51fa\u6765\u305f\u3089 /etc/hosts \u3092\u623b\u3057\u3066\u304a\u304f\uff0e\n\n\n\u3053\u306e\u5f8c\uff0cDNS\u66f8\u304d\u63db\u3048\u3092\u884c\u3044DNS\u304c\u4f1d\u64ad\u3057\u3066\u304b\u3089\u518d\u5ea6\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\uff0e\n\n\n\u5bfe\u8c61\u30c9\u30e1\u30a4\u30f3\u306eSSL\u8a3c\u660e\u66f8\u66f4\u65b0\u3082\u3057\u3066\u304a\u304f\uff0e\n\n\n\n$ sudo certbot certonly -d sub1.example.org\n\n\n\n\u3068\u3044\u3046\u611f\u3058\u3067\u30b5\u30fc\u30d0\u79fb\u884c\u3057\u307e\u3057\u305f\uff0e\n\u305d\u308c\u307e\u3067\u81ea\u5b85\u306b9000\u30a2\u30af\u30bb\u30b9\u307b\u3069\u6709\u308a\u307e\u3057\u305f\u304c8500\u7a0b\u306f\u5916\u306e\u30b5\u30fc\u30d0\u306b\u884c\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff0e\n\n\n\u74b0\u5883\n\n$ dpkg-query -W apache2 certbot\napache2 2.4.38-3+deb10u7\ncertbot 0.31.0-1+deb10u1\n$ lsb_release -dr\nDescription: Debian GNU/Linux 10 (buster)\nRelease: 10\n$ arch\nx86_64", "date_published": "2022-07-12T23:15:27+09:00", "date_modified": "2022-07-12T23:15:29+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" }, "tags": [ "503", "apahce httpd", "httpstatuscode", "buster", "Debian", "Linux" ] }, { "id": "http://matoken.org/blog/?p=3253", "url": "https://matoken.org/blog/2021/05/31/set-robots-txt-in-nitter-alias-setting-in-reverse-proxy-environment-of-apache-httpd/", "title": "Nitter\u306brobots.txt\u3092\u8a2d\u5b9a(Apache httpd\u306ereverse proxy\u74b0\u5883\u3067Alias\u8a2d\u5b9a)", "content_html": "
\n

\u4ee5\u524d\u8efd\u91cfTwitter\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306eNitter \u3092\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u3057\u307e\u3057\u305f\uff0e

\n
\n
\n\n
\n
\n

\u6700\u8fd1\u30a2\u30af\u30bb\u30b9\u304c\u5897\u3048\u3066\u3044\u3066\u5c11\u3057\u30b5\u30fc\u30d0\u304c\u91cd\u304f\u306a\u3063\u305f\u308a\u81ea\u5206\u304c\u4f7f\u3046\u3068\u304d\u306b\u8abf\u5b50\u304c\u60aa\u304b\u3063\u305f\u308a\u3057\u3066\u3044\u307e\u3059\uff0e\u30af\u30ed\u30fc\u30e9\u306a\u3093\u304b\u304c\u591a\u3044\u3088\u3046\u306a\u306e\u3067\u3053\u308c\u3092 robots.txt \u3067\u62d2\u5426\u3059\u308b\u3068\u5927\u5206\u30a2\u30af\u30bb\u30b9\u304c\u6e1b\u308b\u306e\u3067\u306f\u3068\u601d\u3044\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n

\n
\n

\u307e\u305a\u306f\u9069\u5f53\u306a robots.txt \u3092 Nitter \u306e Root \u306b\u7f6e\u3044\u3066\u307f\u307e\u3057\u305f\u304c\uff0c\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\uff0e
\nNitter \u306e\u524d\u6bb5\u306b\u7f6e\u3044\u3066\u3042\u308b Apache2 httpd \u3067Alias \u3092\u8a2d\u5b9a\u3059\u308c\u3070\u3068\u601d\u3063\u3066Apache httpd \u306eNitter \u306e\u8a2d\u5b9a\u306e VirtualHost \u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n
/etc/apache2/sites-available/nitter.matoken.org.conf
\n
\n
        Alias /robots.txt /home/nitter/robots.txt\n        <Location \"/robots.txt\">\n                Require all granted\n        </Location>
\n
\n
\n
\n\n
\n
\n

\u8ffd\u52a0\u3057\u305f\u3042\u3068\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u8a2d\u5b9a\u3092\u518d\u8aad\u8fbc\u3057\u307e\u3059\uff0e

\n
\n
\n
\n
$ sudo a2ensite nitter.matoken.org.conf\n$ sudo apache2ctl configtest\n$ sudo systemctl reload apache2
\n
\n
\n
\n

\u3057\u304b\u3057\u3053\u306e\u72b6\u614b\u3067 /robots.txt \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068http \u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9 404 \u304c\u5e30\u3063\u3066\u304d\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\uff0eProxy \u306e\u65b9\u304c\u512a\u5148\u306e\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n

\u691c\u7d22\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306epage\u3092\u898b\u3064\u3051\u307e\u3057\u305f\uff0e ProxyPass \u3067 ! \u3092\u6307\u5b9a\u3057\u3066\u6307\u5b9a\u3057\u305fURL\u3092Proxy \u3067\u7121\u8996\u3059\u308b\u3088\u3046\u306b\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e

\n
\n
\n\n
\n
\n

\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e

\n
\n
\n
\n
        Alias /robots.txt /home/nitter/robots.txt\n        <Location \"/robots.txt\">\n                ProxyPass !\n                Require all granted\n        </Location>
\n
\n
\n
\n

\u518d\u5ea6\u8a2d\u5b9a\u30c1\u30a7\u30c3\u30af\u3057\u3066\u518d\u8aad\u8fbc\u3059\u308b\u3068\u52d5\u4f5c\u3057\u307e\u3057\u305f :)

\n
\n
\n
\n
$ w3m -dump_head https://nitter.matoken.org/robots.txt\nHTTP/1.1 200 OK\nDate: Sun, 30 May 2021 15:26:17 GMT\nServer: Apache/2.4.38 (Debian) OpenSSL/1.1.1d\nLast-Modified: Mon, 12 Apr 2021 23:19:53 GMT\nETag: \"32c8-5bfcec03dd840-gzip\"\nAccept-Ranges: bytes\nVary: Accept-Encoding\nContent-Encoding: gzip\nContent-Length: 2938\nConnection: close\nContent-Type: text/plain
\n
\n
\n
\n

1\u65e5\u307b\u3069\u5f85\u3063\u3066\u304b\u3089\u30a2\u30af\u30bb\u30b9\u306e\u5909\u5316\u3092\u898b\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\uff0e

\n
\n
\n
\u74b0\u5883
\n
\n
$ dpkg-query -W apache2\napache2 2.4.38-3+deb10u4\n$ lsb_release -dr\nDescription:    Debian GNU/Linux 10 (buster)\nRelease:        10\n$ arch\nx86_64
\n
\n
\n", "content_text": "\u4ee5\u524d\u8efd\u91cfTwitter\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306eNitter \u3092\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u3057\u307e\u3057\u305f\uff0e\n\n\n\n\u8efd\u91cfTwitter\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306eNitter\u3092\u30bb\u30eb\u30d5\u30db\u30b9\u30c8 \u2013 matoken\u2019s meme\n\n\n\n\u6700\u8fd1\u30a2\u30af\u30bb\u30b9\u304c\u5897\u3048\u3066\u3044\u3066\u5c11\u3057\u30b5\u30fc\u30d0\u304c\u91cd\u304f\u306a\u3063\u305f\u308a\u81ea\u5206\u304c\u4f7f\u3046\u3068\u304d\u306b\u8abf\u5b50\u304c\u60aa\u304b\u3063\u305f\u308a\u3057\u3066\u3044\u307e\u3059\uff0e\u30af\u30ed\u30fc\u30e9\u306a\u3093\u304b\u304c\u591a\u3044\u3088\u3046\u306a\u306e\u3067\u3053\u308c\u3092 robots.txt \u3067\u62d2\u5426\u3059\u308b\u3068\u5927\u5206\u30a2\u30af\u30bb\u30b9\u304c\u6e1b\u308b\u306e\u3067\u306f\u3068\u601d\u3044\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n\u307e\u305a\u306f\u9069\u5f53\u306a robots.txt \u3092 Nitter \u306e Root \u306b\u7f6e\u3044\u3066\u307f\u307e\u3057\u305f\u304c\uff0c\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\uff0e\nNitter \u306e\u524d\u6bb5\u306b\u7f6e\u3044\u3066\u3042\u308b Apache2 httpd \u3067Alias \u3092\u8a2d\u5b9a\u3059\u308c\u3070\u3068\u601d\u3063\u3066Apache httpd \u306eNitter \u306e\u8a2d\u5b9a\u306e VirtualHost \u306e\u4e2d\u306b\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n/etc/apache2/sites-available/nitter.matoken.org.conf\n\n Alias /robots.txt /home/nitter/robots.txt\n <Location \"/robots.txt\">\n Require all granted\n </Location>\n\n\n\n\nmod_alias – Apache HTTP \u30b5\u30fc\u30d0 \u30d0\u30fc\u30b8\u30e7\u30f3 2.4\n\n\n\n\u8ffd\u52a0\u3057\u305f\u3042\u3068\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u8a2d\u5b9a\u3092\u518d\u8aad\u8fbc\u3057\u307e\u3059\uff0e\n\n\n\n$ sudo a2ensite nitter.matoken.org.conf\n$ sudo apache2ctl configtest\n$ sudo systemctl reload apache2\n\n\n\n\u3057\u304b\u3057\u3053\u306e\u72b6\u614b\u3067 /robots.txt \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068http \u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9 404 \u304c\u5e30\u3063\u3066\u304d\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\uff0eProxy \u306e\u65b9\u304c\u512a\u5148\u306e\u3088\u3046\u3067\u3059\uff0e\n\n\n\u691c\u7d22\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306epage\u3092\u898b\u3064\u3051\u307e\u3057\u305f\uff0e ProxyPass \u3067 ! \u3092\u6307\u5b9a\u3057\u3066\u6307\u5b9a\u3057\u305fURL\u3092Proxy \u3067\u7121\u8996\u3059\u308b\u3088\u3046\u306b\u3067\u304d\u308b\u3088\u3046\u3067\u3059\uff0e\n\n\n\nGlobal robots.txt on Apache reverse proxy – Tech Knowledge Base – jaytaala.com Confluence\nmod_proxy – Apache HTTP \u30b5\u30fc\u30d0 \u30d0\u30fc\u30b8\u30e7\u30f3 2.4\n\n\n\n\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\n\n\n\n Alias /robots.txt /home/nitter/robots.txt\n <Location \"/robots.txt\">\n ProxyPass !\n Require all granted\n </Location>\n\n\n\n\u518d\u5ea6\u8a2d\u5b9a\u30c1\u30a7\u30c3\u30af\u3057\u3066\u518d\u8aad\u8fbc\u3059\u308b\u3068\u52d5\u4f5c\u3057\u307e\u3057\u305f :)\n\n\n\n$ w3m -dump_head https://nitter.matoken.org/robots.txt\nHTTP/1.1 200 OK\nDate: Sun, 30 May 2021 15:26:17 GMT\nServer: Apache/2.4.38 (Debian) OpenSSL/1.1.1d\nLast-Modified: Mon, 12 Apr 2021 23:19:53 GMT\nETag: \"32c8-5bfcec03dd840-gzip\"\nAccept-Ranges: bytes\nVary: Accept-Encoding\nContent-Encoding: gzip\nContent-Length: 2938\nConnection: close\nContent-Type: text/plain\n\n\n\n1\u65e5\u307b\u3069\u5f85\u3063\u3066\u304b\u3089\u30a2\u30af\u30bb\u30b9\u306e\u5909\u5316\u3092\u898b\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\uff0e\n\n\n\u74b0\u5883\n\n$ dpkg-query -W apache2\napache2 2.4.38-3+deb10u4\n$ lsb_release -dr\nDescription: Debian GNU/Linux 10 (buster)\nRelease: 10\n$ arch\nx86_64", "date_published": "2021-05-31T07:39:20+09:00", "date_modified": "2021-05-31T07:26:42+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" }, "tags": [ "apahce httpd", "Nitter", "buster", "Debian", "Linux" ] }, { "id": "http://matoken.org/blog/?p=2113", "url": "https://matoken.org/blog/2018/09/14/switch-between-php-5-php-7-0-with-debian-stretch/", "title": "Debian stretch \u3067 php5 / php7.0 \u3092\u5207\u308a\u66ff\u3048", "content_html": "
\n

update-alternatives \u3067 OK \u304b\u306a\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\uff0c

\n
\n
\n
\n
$ sudo update-alternatives --config php\r\nThere are 2 choices for the alternative php (providing /usr/bin/php).\r\n\r\n  Selection    Path             Priority   Status\r\n\r\n--------------------\r\n\r\n* 0            /usr/bin/php7.0   70        auto mode\r\n  1            /usr/bin/php5     50        manual mode\r\n  2            /usr/bin/php7.0   70        manual mode\r\n  Press <enter> to keep the current choice[*], or type selection number: 0\r\n$ php -v\r\nPHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )\r\nCopyright (c) 1997-2017 The PHP Group\r\nZend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies\r\n    with Zend OPcache v7.0.30-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies
\n
\n
\n
\n

apache \u3067\u306f php5 \u306e\u307e\u307e\u3067\u3059\uff0e

\n
\n
\n
\n
$ w3m -dump http://localhost/phpinfo.php|grep -m1 'PHP Version'\r\nPHP Version 5.6.30-0+deb8u1
\n
\n
\n
\n

apache module \u3092\u5207\u308a\u66ff\u3048\u305f\u3089ok\u3067\u3057\u305f\uff0e

\n
\n
\n
\n
$ sudo a2dismod php5\r\n$ sudo a2enmod php7.0\r\n$ systemctl restart apache2
\n
\n
\n
\n
\u74b0\u5883
\n
\n
$ dpkg-query -W apache2 php5 libapache2-mod-php5 php7.0 libapache2-mod-php7.0\r\napache2 2.4.25-3+deb9u5\r\nlibapache2-mod-php5     5.6.30+dfsg-0+deb8u1\r\nlibapache2-mod-php7.0   7.0.30-0+deb9u1\r\nphp5    5.6.30+dfsg-0+deb8u1\r\nphp7.0  7.0.30-0+deb9u1\r\n$ lsb_release -d\r\nDescription:    Debian GNU/Linux 9.5 (stretch)\r\n$ uname -m\r\nx86_64
\n
\n
\n", "content_text": "update-alternatives \u3067 OK \u304b\u306a\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\uff0c\n\n\n\n$ sudo update-alternatives --config php\r\nThere are 2 choices for the alternative php (providing /usr/bin/php).\r\n\r\n Selection Path Priority Status\r\n\r\n--------------------\r\n\r\n* 0 /usr/bin/php7.0 70 auto mode\r\n 1 /usr/bin/php5 50 manual mode\r\n 2 /usr/bin/php7.0 70 manual mode\r\n Press <enter> to keep the current choice[*], or type selection number: 0\r\n$ php -v\r\nPHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )\r\nCopyright (c) 1997-2017 The PHP Group\r\nZend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies\r\n with Zend OPcache v7.0.30-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies\n\n\n\napache \u3067\u306f php5 \u306e\u307e\u307e\u3067\u3059\uff0e\n\n\n\n$ w3m -dump http://localhost/phpinfo.php|grep -m1 'PHP Version'\r\nPHP Version 5.6.30-0+deb8u1\n\n\n\napache module \u3092\u5207\u308a\u66ff\u3048\u305f\u3089ok\u3067\u3057\u305f\uff0e\n\n\n\n$ sudo a2dismod php5\r\n$ sudo a2enmod php7.0\r\n$ systemctl restart apache2\n\n\n\n\u74b0\u5883\n\n$ dpkg-query -W apache2 php5 libapache2-mod-php5 php7.0 libapache2-mod-php7.0\r\napache2 2.4.25-3+deb9u5\r\nlibapache2-mod-php5 5.6.30+dfsg-0+deb8u1\r\nlibapache2-mod-php7.0 7.0.30-0+deb9u1\r\nphp5 5.6.30+dfsg-0+deb8u1\r\nphp7.0 7.0.30-0+deb9u1\r\n$ lsb_release -d\r\nDescription: Debian GNU/Linux 9.5 (stretch)\r\n$ uname -m\r\nx86_64", "date_published": "2018-09-14T06:34:26+09:00", "date_modified": "2018-09-14T06:34:26+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" }, "tags": [ "apahce httpd", "Debian stretch", "php", "Debian", "Linux", "stretch" ] }, { "id": "http://matoken.org/blog/?p=833", "url": "https://matoken.org/blog/2015/06/29/apache-httpd-2-4/", "title": "apache httpd 2.4 \u3067\u5d4c\u307e\u308b", "content_html": "

\"DP1M0712\"

\n

apahce httpd 2.2.(wheezy)\u304b\u30892.4.(jessie)\u3078\u306e\u79fb\u884c\u3067\u9069\u5f53\u306a\u30b5\u30fc\u30d0\u3092\u3048\u3044\u3084\u3067\u4e0a\u3052\u3066\u52d5\u304b\u306a\u304f\u306a\u3063\u305f\u306e\u3092\u5fa9\u65e7\u3057\u305f\u30e1\u30e2\uff0e

\n

virtual host \u304c\u6709\u52b9\u306b\u306a\u3089\u306a\u3044

\n

/etc/apache2/sites-enabled/ \u4ee5\u4e0b\u306b\u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u306e\u306b\u8aad\u307f\u8fbc\u307e\u308c\u305a default \u3057\u304b\u8868\u793a\u3055\u308c\u306a\u3044\uff0e

\n

sites-available \u304b\u3089\u30ea\u30f3\u30af\u3092\u8cbc\u308a\u76f4\u305d\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u3068\u306a\u308b

\n
$ sudo a2dissite example.com\r\nERROR: Site example.com does not exist!\r\n$ sudo rm /etc/apache2/sites-enabled/example.com\r\n$ sudo a2ensite example.com\r\nERROR: Site example.com does not exist!\r\n
\n

\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u691c\u7d22\u3059\u308b\u3068\u30d5\u30a1\u30a4\u30eb\u540d\u3092 *.conf \u306b\u3059\u308c\u3070\u826f\u3044\u3088\u3046\uff0e

\n\n

\u3053\u306e\u90e8\u5206\u306e\u8a72\u5f53\u5834\u6240\u306f /etc/apache2/apache2.conf \u306e\u3053\u3053

\n
IncludeOptional sites-enabled/*.conf\r\n
\n

2.2\u304b\u3089\u306e\u5909\u66f4\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306b\u5909\u308f\u3063\u3066\u3044\u305f\uff0e

\n
 # Include the virtual host configurations:\r\n-Include sites-enabled/\r\n+IncludeOptional sites-enabled/*.conf\r\n
\n

\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u3093\u306a\u611f\u3058\u3067

\n
$ sudo rm /etc/apache2/sites-enabled/example.com\r\n$ sudo mv /etc/apache2/sites-available/example.com /etc/apache2/sites-available/example.com.conf\r\n$ sudo  a2ensite example.com.conf\r\n
\n

\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u6570\u304c\u591a\u304b\u3063\u305f\u3089 /etc/apache2/apache2.conf \u306e\u8a2d\u5b9a\u3092 * \u306b\u3057\u3066\u3082\u826f\u3044\u304b\u3082(\u672a\u691c\u8a3c)

\n
-IncludeOptional sites-enabled/*.conf\r\n+IncludeOptional sites-enabled/*\r\n
\n

403 \u304c\u51fa\u308b

\n

\u30a8\u30e9\u30fc\u30ed\u30b0\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\uff0e\u898b\u6163\u308c\u306a\u3044\u30a8\u30e9\u30fc\uff0e

\n
\n

[authz_core:error] [pid 20566] [client nnn.nnn.nnn.nnn:49821] AH01630: client denied by server configuration: /var/www

\n
\n

\u4ee5\u4e0b\u306e\u30ac\u30a4\u30c9\u3092\u898b\u308b\u3068\u3069\u3046\u3082acl \u5468\u308a\u306e\u30b3\u30de\u30f3\u30c9\u5909\u66f4\u306e\u3088\u3046\u3067

\n\n
Order deny,allow\r\nDeny from all\r\n
\n

\u306e\u4ee3\u308f\u308a\u306b

\n
Require all granted\r\n
\n

\u3067\u52d5\u304f\u3088\u3046\u306b\u306a\u3063\u305f\uff0e

\n
\n", "content_text": "apahce httpd 2.2.(wheezy)\u304b\u30892.4.(jessie)\u3078\u306e\u79fb\u884c\u3067\u9069\u5f53\u306a\u30b5\u30fc\u30d0\u3092\u3048\u3044\u3084\u3067\u4e0a\u3052\u3066\u52d5\u304b\u306a\u304f\u306a\u3063\u305f\u306e\u3092\u5fa9\u65e7\u3057\u305f\u30e1\u30e2\uff0e\nvirtual host \u304c\u6709\u52b9\u306b\u306a\u3089\u306a\u3044\n/etc/apache2/sites-enabled/ \u4ee5\u4e0b\u306b\u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u306e\u306b\u8aad\u307f\u8fbc\u307e\u308c\u305a default \u3057\u304b\u8868\u793a\u3055\u308c\u306a\u3044\uff0e\nsites-available \u304b\u3089\u30ea\u30f3\u30af\u3092\u8cbc\u308a\u76f4\u305d\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u3068\u306a\u308b\n$ sudo a2dissite example.com\r\nERROR: Site example.com does not exist!\r\n$ sudo rm /etc/apache2/sites-enabled/example.com\r\n$ sudo a2ensite example.com\r\nERROR: Site example.com does not exist!\r\n\n\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u691c\u7d22\u3059\u308b\u3068\u30d5\u30a1\u30a4\u30eb\u540d\u3092 *.conf \u306b\u3059\u308c\u3070\u826f\u3044\u3088\u3046\uff0e\n\nApache a2ensite \u2013 Error! Site Does Not Exist | Epic FooBar\n\n\u3053\u306e\u90e8\u5206\u306e\u8a72\u5f53\u5834\u6240\u306f /etc/apache2/apache2.conf \u306e\u3053\u3053\nIncludeOptional sites-enabled/*.conf\r\n\n2.2\u304b\u3089\u306e\u5909\u66f4\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3053\u306e\u3088\u3046\u306b\u5909\u308f\u3063\u3066\u3044\u305f\uff0e\n # Include the virtual host configurations:\r\n-Include sites-enabled/\r\n+IncludeOptional sites-enabled/*.conf\r\n\n\u3068\u3044\u3046\u3053\u3068\u3067\u3053\u3093\u306a\u611f\u3058\u3067\n$ sudo rm /etc/apache2/sites-enabled/example.com\r\n$ sudo mv /etc/apache2/sites-available/example.com /etc/apache2/sites-available/example.com.conf\r\n$ sudo a2ensite example.com.conf\r\n\n\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u6570\u304c\u591a\u304b\u3063\u305f\u3089 /etc/apache2/apache2.conf \u306e\u8a2d\u5b9a\u3092 * \u306b\u3057\u3066\u3082\u826f\u3044\u304b\u3082(\u672a\u691c\u8a3c)\n-IncludeOptional sites-enabled/*.conf\r\n+IncludeOptional sites-enabled/*\r\n\n403 \u304c\u51fa\u308b\n\u30a8\u30e9\u30fc\u30ed\u30b0\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\uff0e\u898b\u6163\u308c\u306a\u3044\u30a8\u30e9\u30fc\uff0e\n\n[authz_core:error] [pid 20566] [client nnn.nnn.nnn.nnn:49821] AH01630: client denied by server configuration: /var/www\n\n\u4ee5\u4e0b\u306e\u30ac\u30a4\u30c9\u3092\u898b\u308b\u3068\u3069\u3046\u3082acl \u5468\u308a\u306e\u30b3\u30de\u30f3\u30c9\u5909\u66f4\u306e\u3088\u3046\u3067\n\nUpgrading to 2.4 from 2.2 – Apache HTTP Server Version 2.4\n\nOrder deny,allow\r\nDeny from all\r\n\n\u306e\u4ee3\u308f\u308a\u306b\nRequire all granted\r\n\n\u3067\u52d5\u304f\u3088\u3046\u306b\u306a\u3063\u305f\uff0e", "date_published": "2015-06-29T21:06:31+09:00", "date_modified": "2015-06-30T07:47:01+09:00", "authors": [ { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" } ], "author": { "name": "matoken", "url": "https://matoken.org/blog/author/matoken/", "avatar": "https://secure.gravatar.com/avatar/1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9?s=512&d=mm&r=g" }, "tags": [ "apahce httpd", "Jessie", "Linux", "OSS", "Wheezy" ] } ] }