経緯
IDCF CloudでVPSサーバーを借り、Ubuntu 16.04 LTSを入れてapache2でサーバーを運用しています。
お名前.comでドメインを購入し、DNSもお名前.comを利用しています。
- http(s)://irregular-at-tus.work/
- https://kamioda.irregular-at-tus.work/
- https://netdata.irregular-at-tus.work/
- http(s)://secure.kamioda.irregular-at-tus.work/
のサブドメインを運用しています。
現象
かつてa2ensite
で有効にしていたいくつかのVirtualHostをa2dissite
で無効にし
のみにしたところ、その設定が反映されません。
DNSはそのうちまた使い回すのでAレコードは貼ったままです。
情報
a2dissite
後から
$ sudo systemctl reload apache2 $ ls -l /etc/apache2/sites-available/ 合計 32 -rw-r--r-- 1 root root 1332 3月 19 2016 000-default.conf -rw-r--r-- 1 root root 444 3月 13 19:18 celluloce.conf -rw-r--r-- 1 root root 6338 4月 6 2016 default-ssl.conf -rw-r--r-- 1 root root 1423 6月 2 18:18 kamioda-ssl.conf -rw-r--r-- 1 root root 889 6月 6 21:54 kamioda.conf -rw-r--r-- 1 root root 1548 4月 12 22:36 netdata.conf -rw-r--r-- 1 root root 432 4月 1 09:27 yumetodo.conf $ ls -l /etc/apache2/sites-enabled/ 合計 0 lrwxrwxrwx 1 root root 31 5月 14 18:35 kamioda.conf -> ../sites-available/kamioda.conf lrwxrwxrwx 1 root root 31 4月 1 13:06 netdata.conf -> ../sites-available/netdata.conf $ ls | xargs grep ServerName 000-default.conf: # The ServerName directive sets the request scheme, hostname and port that 000-default.conf: # redirection URLs. In the context of virtual hosts, the ServerName 000-default.conf: #ServerName www.example.com celluloce.conf: #ServerName celluloce.irregular-at-tus.work kamioda-ssl.conf: ServerName secure.kamioda.irregular-at-tus.work kamioda-ssl.conf: ServerName secure.kamioda.irregular-at-tus.work:443 kamioda.conf: ServerName kamioda.irregular-at-tus.work netdata.conf: ServerName netdata.irregular-at-tus.work netdata.conf: ServerName netdata.irregular-at-tus.work yumetodo.conf: #ServerName yumetodo.irregular-at-tus.work $ ls | xargs grep DocumentRoot 000-default.conf: DocumentRoot /var/www/html celluloce.conf: #DocumentRoot /home/celluloce/website default-ssl.conf: DocumentRoot /var/www/html kamioda-ssl.conf: DocumentRoot /home/kamioda/website/https/ kamioda.conf: DocumentRoot /home/kamioda/website/http/ netdata.conf: DocumentRoot /usr/share/netdata/web/ netdata.conf: DocumentRoot /usr/share/netdata/web/ yumetodo.conf: #DocumentRoot /home/yumetodo/website $ cat kamioda.conf | grep -v ServerAdmin <VirtualHost *:80> ServerName kamioda.irregular-at-tus.work DocumentRoot /home/kamioda/website/http/ LogLevel info ErrorLog /home/kamioda/logs/error.log CustomLog /home/kamioda/logs/access.log combined Include conf-available/serve-cgi-bin.conf ScriptAlias /cgi-bin/ /home/kamioda/cgi-bin/ ErrorDocument 403 /home/kamioda/website/errorpage/403.shtml ErrorDocument 404 /home/kamioda/website/errorpage/404.shtml ErrorDocument 500 /home/kamioda/website/errorpage/500.shtml </VirtualHost> <Directory /home/kamioda/website/http/> SetEnv HTTP_X_FORWARDED_PROTO http SetEnv REAL_HOST_NAME kamioda.irregular-at-tus.work Options ExecCGI Options -Indexes Options FollowSymLinks AllowOverride All Require all granted AddHandler cgi-script .cgi .pl .py Order allow,deny Allow from all </Directory> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet $ cat netdata.conf <VirtualHost *:80> ServerName netdata.irregular-at-tus.work ServerAdmin https://qiitadon.com/@yumetodo DocumentRoot /usr/share/netdata/web/ Redirect permanent "/" "https://netdata.irregular-at-tus.work/" ErrorLog /home/for_netdata/logs/netdata-error.log CustomLog /home/for_netdata/logs/netdata-access.log combined </VirtualHost> <VirtualHost *:443> ServerName netdata.irregular-at-tus.work ServerAdmin https://qiitadon.com/@yumetodo DocumentRoot /usr/share/netdata/web/ SSLEngine On SSLCertificateFile /etc/letsencrypt/live/netdata.irregular-at-tus.work/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/netdata.irregular-at-tus.work/privkey.pem SSLProtocol TLSv1.2 Header set Strict-Transport-Security "max-age=31536000; includeSubDomains" ProxyRequests Off ProxyPreserveHost On <Proxy *> Require all granted </Proxy> # Local 127.0.0.1:19999 netdata server accessed with '/' ProxyPass "/" "http://127.0.0.1:19999/" connectiontimeout=5 timeout=30 ProxyPassReverse "/" "http://127.0.0.1:19999/" <Location /> AuthType Digest AuthName "Digest Auth" AuthUserFile /etc/apache2/.htdigest Require valid-user </Location> <FilesMatch ".(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 ErrorLog /home/for_netdata/logs/netdata-error.log CustomLog /home/for_netdata/logs/netdata-access.log combined </VirtualHost>
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。