root@ns:/etc/apache2/ssl# openssl req -new -key /etc/apache2/ssl/apache.pem -out sv60.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Tokyo
Locality Name (eg, city) []:Izu
Organization Name (eg, company) [Internet Widgits Pty Ltd]:***
Organizational Unit Name (eg, section) []:Somu
Common Name (e.g. server FQDN or YOUR name) []:sv60.test.com
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
root@ns:/etc/apache2/sites-available# /etc/init.d/apache2 reload
[....] Reloading apache2 configuration (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
エラーの原因は
systemctl status apache2.service
を実行すると分かる。pemファイルつづり間違えた(;゚Д゚)
root@ns:/etc/apache2/sites-available# systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
mqforking.conf
Active: active (running) (Result: exit-code) since 木 2019-07-11 09:31:38 JST; 3 months 17 days ago
Process: 27263 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 8930 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Process: 27287 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/apache2.service
tq 6854 /usr/sbin/apache2 -k start
tq 6856 /usr/sbin/apache2 -k start
tq 6857 /usr/sbin/apache2 -k start
tq 6858 /usr/sbin/apache2 -k start
tq 6859 /usr/sbin/apache2 -k start
tq 6860 /usr/sbin/apache2 -k start
tq 7031 /usr/sbin/apache2 -k start
tq 7688 /usr/sbin/apache2 -k start
mq27302 /usr/sbin/apache2 -k start
10月 28 17:00:32 ns systemd[1]: Reloading LSB: Apache2 web server.
10月 28 17:00:32 ns apache2[8930]: Reloading web server: apache2 failed!
10月 28 17:00:32 ns apache2[8930]: The apache2 configtest failed. Not doing anything. ... (warning).
10月 28 17:00:32 ns apache2[8930]: Output of config test was:
10月 28 17:00:32 ns apache2[8930]: AH00526: Syntax error on line 33 of /etc/apache2/sites-enabled/default-ssl.conf:
10月 28 17:00:32 ns apache2[8930]: SSLCertificateFile: file '/etc/apache2/ssl20191028/apachepem' does not exist or is empty
10月 28 17:00:32 ns apache2[8930]: Action 'configtest' failed.
10月 28 17:00:32 ns apache2[8930]: The Apache error log may have more information.
10月 28 17:00:32 ns systemd[1]: apache2.service: control process exited, code=exited status=1
10月 28 17:00:32 ns systemd[1]: Reload failed for LSB: Apache2 web server.
Hint: Some lines were ellipsized, use -l to show in full.