yasunari@aws:~$ sudo apt-get install apache2 [sudo] password for yasunari: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 ssl-cert Suggested packages: www-browser apache2-doc apache2-suexec-pristine | apache2-suexec-custom openssl-blacklist The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 ssl-cert 0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Need to get 2,144 kB of archives. After this operation, 7,137 kB of additional disk space will be used. Do you want to continue? [Y/n] y : : Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service 皴lib/systemd/system/apache2.service. Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service 皴lib/systemd/system/apache-htcacheclean.service. Processing triggers for libc-bin (2.24-11+deb9u1) ... Processing triggers for systemd (232-25+deb9u1) ... yasunari@aws:~$
yasunari@aws:~$ sudo -i root@aws:~# mkdir /home/httpd root@aws:~# ls /var/www/html index.html root@aws:~# ln -s /var/www/html /home/httpd root@aws:~# ls /usr/lib/cgi-bin/ root@aws:~# ln -s !$ /home/httpd ln -s /usr/lib/cgi-bin/ /home/httpd root@aws:~# ls -l /home/httpd/ total 0 lrwxrwxrwx 1 root root 17 Dec 27 19:21 cgi-bin -> /usr/lib/cgi-bin/ lrwxrwxrwx 1 root root 13 Dec 27 19:20 html -> /var/www/html root@aws:~#
It Works!
root@aws:~# chgrp www-data /usr/lib/cgi-bin /var/www/html root@aws:~# chmod g+ws /usr/lib/cgi-bin/ /var/www/html/ root@aws:~# ls -ld /usr/lib/cgi-bin/ /var/www/html/ drwxrwsr-x 2 root www-data 4096 Sep 20 03:58 /usr/lib/cgi-bin/ drwxrwsr-x 2 root www-data 4096 Dec 27 19:18 /var/www/html/ root@aws:~# addgroup yasunari www-data Adding user `yasunari' to group `www-data' ... Adding user yasunari to group www-data Done. root@aws:~# rm /var/www/html/index.html root@aws:~#
yasunari@xhl:~$ cd /home/httpd/html yasunari@xhl:/home/httpd/html$ rsync -rtuvpogtlH --timeout=360 -e "ssh -p 内緒 -i /home/yamasita/yasunari/.ssh/aws1.pem" index.html aws.yamasita.jp:/var/www/html sending incremental file list index.html sent 7810 bytes received 31 bytes 5227.33 bytes/sec total size is 7712 speedup is 0.98 yasunari@xhl:/home/httpd/html$などなど。略
見慣れた景色が!!
www IN CNAME aws.yamasita.jp.bind の再起動。
これで www.yamasita.jp は雲の上へ
← メールサーバの構築(4)alias の設定 |
山下康成の 雲の上 |
→ Web サーバの構築(2)Movable Type のインストール |
ツイート Tweet to @yasunari_y @yasunari_yをフォロー
Copyright (C) 2003-2018 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市/東京都新宿区