ユーザ用ツール

サイト用ツール


tools:apache:operation:change_port_number

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

次のリビジョン
前のリビジョン
tools:apache:operation:change_port_number [2020/12/16 08:02]
michiya 作成
tools:apache:operation:change_port_number [2021/01/09 14:37] (現在)
行 1: 行 1:
 ====== ポートの変更 ====== ====== ポートの変更 ======
  
-40980のポートを使用する場合.\\+  * 40980のポートを使用する場合 
 /etc/apache2/sites-available/ports.confを以下のように編集. /etc/apache2/sites-available/ports.confを以下のように編集.
  
行 9: 行 10:
 ... ...
 </code> </code>
 +
 +/etc/apache2/sites-available/siteA.confを以下のように編集
 +<code>
 +...
 +<VirtualHost *:40980>
 +        ServerAdmin webmaster@localhost
 +        ServerName ***.***
 +        ServerAlias ***.***.***
 +        DocumentRoot /var/www/***
 +</VirtualHost>
 +...
 +</code>
 +
 +Apacheを再起動.
 +<code>
 +# systemctl reload apache2.service
 +</code>
 +
 +ファイアウォールを許可.
 +<code>
 +# ufw allow 40980
 +# ufw status
 +</code>
 +
 +<code>
 +Status: active
 +
 +To                         Action      From
 +--                         ------      ----
 +Apache                     ALLOW       Anywhere
 +OpenSSH                    ALLOW       Anywhere
 +40980                      ALLOW       Anywhere
 +Apache (v6)                ALLOW       Anywhere (v6)
 +OpenSSH (v6)               ALLOW       Anywhere (v6)
 +40980 (v6)                 ALLOW       Anywhere (v6)
 +</code>
 +
 +
tools/apache/operation/change_port_number.1608105737.txt.gz · 最終更新: 2021/01/09 14:37 (外部編集)