さくら VPS Ubuntu SiteGuard

さくら SiteGuard アップデ-トⅥ-2

ここまで、インストールに失敗したように見えますが、くじけずアップデ-トを進めます。 setup.sh を実行して、Apache の設定やウェブ管理画面のアクセス制御などの設定を行います。
SiteGuard マネージドサービスを利用しますので、ダウンロードしたエージェントインストーラー
siteguard-server-edition-8.00-1.apache.x86_64 を
/opt/jp-secure/siteguardlite/
に配置します。
yamada@********:~$ sudo cp -r siteguard-server-edition-8.00-1.apache.x86_64 /opt/jp-secure/siteguardlite/
-r オプション
コピー元にディレクトリを指定した場合、再帰的に(サブディレクトリも含めて)コピーする
root 権限で、以下のコマンドを実行します。 # cd /opt/jp-secure/siteguardlite/ # ./setup.sh セットアップシェルが実行されます。


yamada@********:~$ cd /opt/jp-secure/siteguardlite
yamada@********:/opt/jp-secure/siteguardlite$ sudo ./setup.sh

------------------------------------------------------
  SiteGuard Server Edition setup start...
------------------------------------------------------

SiteGuard Server Edition is already setup.
Apache Config File: /etc/apache2/apache2.conf
Apache Type: 64_2.4
please select. [s:setup all]  i:indivisual menu  r:remove  m:managed service setup  q:quit -->s
do you want to use the siteguard managed service?
[the siteguard managed service とは有料版のサービスを指しているらしい]
* to use the siteguard managed service, you will need the agent installer file and internet access required.
please select. yes|[no] --> n
[さくらの SiteGuard は無料版なので no 又は enter にします]
[ヒント]
  SiteGuard マネージド(有償版)サービスを使用する場合は、yes を指定します。
  SiteGuard マネージドサービスを使用しない場合は、no を指定します。
  さくらの無償サービス版ですので no を選択します。
please enter Apache Config File. [/etc/apache2/apache2.conf] -->
Apache Config File=[/etc/apache2/apache2.conf]
is correct? [yes]|no -->

please enter Apache Binary File (httpd). [/usr/sbin/apache2] -->
Apache Binary File (httpd)=[/usr/sbin/apache2]
is correct? [yes]|no -->

Is the Web server registered in systemd?
please select. [yes]|no -->

please enter Apache service name. [apache2] -->
Apache service name=[apache2]
is correct? [yes]|no -->y

do you want to use the web administrative console?
* to use the console, you will need JDK or JRE is installed.
please select. [yes]|no -->y

please enter JDK or JRE directory. [/usr/lib/jvm/java-1.11.0-openjdk-amd64] -->^y    
[y] is not exist.                            
please enter JDK or JRE directory. [] -->/usr/lib/jvm/java-21-openjdk-amd64
JDK or JRE directory=[/usr/lib/jvm/java-21-openjdk-amd64]
is correct? [yes]|no -->y

please enter the port number of the web console for https.
please enter port number. [9443] -->
port number=[9443]
is correct? [yes]|no -->y

please enter the addresses allowed to access the web console for https.
ex:192.168.1.100 10.0.0.0/24
please enter allowed addresses. [all] -->
allowed addresses=[all]
is correct? [yes]|no -->y

do you change the ssl certificate files?
please select. yes|[no] -->y

please enter the ssl certificate file (crt file) path.
please enter ssl certificate file path. [/opt/jp-secure/siteguardlite/conf/ssl/server.crt] -->/etc/letsencrypt/live/xxx70vps.xxnet/cert.pem^[[C^[[3 
[/etc/letsencrypt/live/xxx70vps.xxnet/cert.pem  is not exist.
please enter ssl certificate file path. [/opt/jp-secure/siteguardlite/conf/ssl/server.crt] -->//etc/letsencrypt/live/xxx70vps.xxnet/cert.pem        
[//etc/letsencrypt/live/xxx70vps.xxnet/cert.pem] is not exist.
please enter ssl certificate file path. [/opt/jp-secure/siteguardlite/conf/ssl/server.crt] -->/etc/letsencrypt/live/70vps.net/cert.pem
ssl certificate file path=[/etc/letsencrypt/live/70vps.net/cert.pem]
is correct? [yes]|no -->y

please enter the ssl server key file (key file) path.
please enter ssl server key file path. [/opt/jp-secure/siteguardlite/conf/ssl/server.key] -->/etc/letsencrypt/live/70vps.net/privkey.pem           
ssl server key file path=[/etc/letsencrypt/live/70vps.net/privkey.pem]
is correct? [yes]|no -->y
update server config file done.
------------------------------------------------------
  check if the ssl settings on admin console are appropriate....
------------------------------------------------------
Skip the SSL protocol setting process(03).
update Makefile done.
------------------------------------------------------
  Starting services...
------------------------------------------------------
Starting Tomcat(WebUI for SiteGuard Server Edition):  [ OK ]
Starting Notify Service:  [ OK ]

Apache restart. Are you sure? [yes]|no -->y
Stopping :  [ OK ]
------------------------------------------------------
  clear tmp files
------------------------------------------------------
removing tmp files ...
done.
starting web server ...

Starting :  [ OK ]
Apache restart done.
------------------------------------------------------
  finished SiteGuard Server Edition setup
------------------------------------------------------
  Please access following URL for starting service.
  https://ik1-307-13998:9443/
  (default user:admin, default password:admin) 

------------------------------------------------------
  SiteGuard Server Edition setup done...
------------------------------------------------------

トラステッド・シグネチャ更新 URL 設定

トラステッド・シグネチャ更新 URL 設定はアップデ-ト後も
「_sp」
は残っていました。
「LATEST_URL」行の URL に _sp を加える処理は改めて行なう必要はありません。

yamada@********:~$ cat /opt/jp-secure/siteguardlite/conf/dbupdate_waf_url.conf
# LATEST_URL=https://www.jp-secure.com/download/siteguardlite/updates_lite/latest-lite.zip
LATEST_URL=https://www.jp-secure.com/download/siteguardlite_sp/updates_lite/latest-lite.zip

以上で、SiteGuard Server Edition Ver8.0.0-1 へのアップグレード終了です。

トラステッド・シグネチャ更新 URL 設定

トラステッド・シグネチャ更新 URL 設定はアップデ-ト後も
「_sp」
は残っていました。
「LATEST_URL」行の URL に _sp を加える処理は改めて行なう必要はありません。

$ cat /opt/jp-secure/siteguardlite/conf/dbupdate_waf_url.conf
# LATEST_URL=https://www.jp-secure.com/download/siteguardlite/updates_lite/latest-lite.zip
LATEST_URL=https://www.jp-secure.com/download/siteguardlite_sp/updates_lite/latest-lite.zip

で要確認。

SSL 証明書設定変更

セットアップシェルで SSL 証明書を間違えた場合は SSL 証明書ファイルを変更します。

$ sudo nano /opt/jp-secure/siteguardlite/conf/httpd.conf.siteguardlite_admin_ssl

を開き以下のように変更します。
Let's Encrypt のものにします。

  SSLCertificateFile /opt/jp-secure/siteguardlite/conf/ssl/server.crt

の先頭に#印をつけてコメントアウトしそのかわりにその直下に

  SSLCertificateFile /etc/letsencrypt/live/xxx70vps.xxnet/cert.pem
  (xxxxx.xxxはドメイン名)

を指定し

  SSLCertificateKeyFile /opt/jp-secure/siteguardlite/conf/ssl/server.key

の先頭に#印をつけてコメントアウトしそのかわりにその直下に

  SSLCertificateKeyFile /etc/letsencrypt/live/xxx70vps.xxnet/privkey.pem
  (xxxxx.xxxはドメイン名)

を指定してください。
修正が完了したら
$ sudo service apache2 restart
で Apache を再起動します。

mod_proxy の確認

SiteGuard Server Editionを動かすためには mod_proxy が必要です。
apache2ctl -M で proxy_http_module (shared) があることを確認します。

yamada@*************:~$ apache2ctl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php_module (shared)
 proxy_module (shared)
 proxy_http_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)
 userdir_module (shared)
 siteguard_module (shared)

proxy_http がない場合は、 以下のコマンドで有効にします。
(一緒にsslモジュールと rewrite モジュールも有効にします)
アップデ-トの場合は念のため
モジュールを有効にしたら Apache2 を再起動します。
$ sudo a2enmod ssl
$ sudo a2enmod rewrite
$ sudo a2enmod proxy_http # これを忘れないこと
$ sudo systemctl restart apache2
また、必要な Java(JDK/JRE)のインストールディレクトリを調べたい場合は 以下のコマンドで調べることができます。
$ /usr/sbin/update-java-alternatives -l
私の場合
/usr/lib/jvm/java-1.21.0-openjdk-amd64
にインスト-ルされていました。

SiteGuard 管理画面へのアクセス

SiteGuard 管理画面のアクセスに使う URL は、
Let's encryptを設定したときのドメイン名xxxxx.xxxを使って
https://xxxxx.xxx:**43
でアクセスする必要があります。
SiteGuard 管理画面アクセス例
https://***70vps.**net:**43/
でアクセス、
user : アップデ-ト前に設定した ID
password : アップデ-ト前に設定した Pass
で入ることができます。
以前の状態が保持されたままアップデ-トできていました。


  • さくら VPS Ubuntu SiteGuard ログイン不可 に進む
  • SiteGuard の検査無効 に進む
  • さくら SiteGuard アップデ-トⅥ概要 に戻る
  • さくら SiteGuard アップデ-トⅤ概要 に戻る
  • さくら SiteGuard アップデ-トⅢ概要 に戻る
  • さくら SiteGuard アップデ-トⅡ概要 に戻る
  • さくら SiteGuard アップデ-ト概要 に戻る
  • さくら SiteGuard サボ-ト体制 に戻る
  • さくら SiteGuard トラステッド・シグネチャ更新設定 に戻る
  • さくら SiteGuard ライセンス情報登録 に戻る
  • さくら SiteGuard セットアップ後処理 に戻る
  • さくら SiteGuard 再セットアップ に戻る
  • さくら SiteGuard インスト-ル に戻る
  • さくら SiteGuard 概要 に戻る
  • さくら SiteGuard 再セットアップ に進む
  • さくら SiteGuard 概要 に戻る
  • 70VPS に戻る