{"id":14628,"date":"2025-01-31T03:55:38","date_gmt":"2025-01-30T18:55:38","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=14628"},"modified":"2025-02-14T02:26:12","modified_gmt":"2025-02-13T17:26:12","slug":"__trashed-5","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=14628","title":{"rendered":"\u3010Laravel 11.x\u3011SSL\u671f\u9650\u5207\u308c\u30fb\u76e3\u8996\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u3055\u3066\u3055\u3066\u3001\u5148\u65e5\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u7121\u6599\u3067HTTPS\u5316\u3067\u304d\u308b\u6709\u540d\u30b5\u30fc\u30d3\u30b9\u300c<strong>Let&#8217;s Encrypt<\/strong>\u300d\u304b\u3089<strong>\u3068\u3066\u3082\u91cd\u8981\u306a\u30e1\u30fc\u30eb<\/strong>\u304c\u6765\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\uff08\u629c\u7c8b\uff09As a Let\u2019s Encrypt Subscriber, you benefit from access to free, automated TLS certificates. One way we have supported Subscribers is by sending expiration notification emails when it\u2019s time to renew a certificate.<\/p>\n\n\n\n<p class=\"has-small-font-size\">We\u2019re writing to inform you that we intend to discontinue sending expiration notification emails. You can learn more in this blog post.<\/p>\n<\/blockquote>\n\n\n\n<p><strong>\u3072\u3068\u8a00\u3067\u610f\u8a33\u300c\u901a\u77e5\u30e1\u30fc\u30eb\u3084\u3081\u308b\u308f\uff01\u300d<\/strong><\/p>\n\n\n\n<p>\u305d\u3046\u3067\u3059\u3002\u3064\u307e\u308a\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n\n\n\n<p class=\"has-large-font-size\">cron\u3084systemd\u3067\u8a3c\u660e\u66f8\u306e\u81ea\u52d5\u66f4\u65b0\u306b\u5931\u6557\u3057\u305f\u3089\u3001\u6c17\u3065\u304b\u306a\u3044\u3046\u3061\u306bHTTPS\u304c\u5207\u308c\u308b\ud83d\ude31<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p><mark>\u6700\u8fd1\u306e\u30d6\u30e9\u30a6\u30b6\u306fHTTPS\u3058\u3083\u306a\u3044\u3068\u8b66\u544a\u304c\u51fa\u308b\u306e\u3067\u3001<strong>\u904b\u55b6\u8005\u3078\u306e\u30de\u30a4\u30ca\u30b9\u306f\u591a\u5927<\/strong>\u3067\u3059\u3088\u306d\u3002<\/mark><\/p>\n\n\n\n<p>\u305d\u3057\u3066\u3001X\u306b\u3053\u306e\u4e8b\u5b9f\u3092\u6295\u7a3f\u3057\u305f\u3068\u3053\u308d\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u76e3\u8996\u30c4\u30fc\u30eb\u3092\u3064\u304b\u3046<\/li>\n\n\n\n<li>Linux\u30b3\u30de\u30f3\u30c9\u3067\u30c1\u30a7\u30c3\u30af\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<p>\u3068\u3044\u3063\u305f\u4ee3\u66ff\u6848\u3092\u6559\u3048\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\uff08\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\uff01\uff09<\/p>\n\n\n\n<p>\u3044\u308d\u3044\u308d\u691c\u8a0e\u3057\u305f\u7d50\u679c\u3001<code>Let's Encrypt<\/code>\u304c\u3059\u3059\u3081\u3066\u3044\u308b\u76e3\u8996\u30c4\u30fc\u30eb\u300c<a href=\"https:\/\/redsift.com\/pulse-platform\/certificates-lite\" target=\"_blank\" rel=\"noreferrer noopener\">Red Sift Certificates Lite<\/a>\u300d\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u7121\u6599\u30b5\u30fc\u30d3\u30b9\u306a\u306e\u3067\u5236\u9650\u304c\u4eca\u5f8c\u3069\u3046\u306a\u308b\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001\u5ff5\u306e\u305f\u3081\u300c<strong>\u81ea\u524d\u3067\u3082\u4f5c\u3063\u3068\u304f\u304b\ud83d\ude0a<\/strong>\u300d\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u2757<\/p>\n\n\n\n<p>\u4eca\u56de\u306f<code>Laravel<\/code>\u3067\u4ee5\u4e0b3\u3064\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3059\uff01<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>SSL\u8a3c\u660e\u66f8\u304c7\u65e5\u4ee5\u5185\u306a\u3089\u30e1\u30fc\u30eb\u3067\u901a\u77e5<\/li>\n\n\n\n<li>\u30c1\u30a7\u30c3\u30af\u3059\u308b\u30c9\u30e1\u30a4\u30f3\u306f\u3001\u8907\u6570OK<\/li>\n\n\n\n<li><strong>\u81ea\u52d5\u3067\u5b9a\u671f\u7684\u306b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u308b\u2190\u697d\u3057\u305f\u3044\u306e\u3067\u3001\u3053\u3053\u91cd\u8981<\/strong><\/li>\n<\/ol>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u4eba\u306b\u5411\u3051\u3066\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u300c\u81ea\u52d5\u3067SSL\u8a3c\u660e\u66f8\u3092\u76e3\u8996\u3057\u305f\u3044\u300d<\/li>\n\n\n\n<li>\u300c\u30b3\u30d4\u30da\u3060\u3051\u3067\u5c0e\u5165\u3057\u305f\u3044\u300d<\/li>\n\n\n\n<li>\u300c\u5b9a\u671f\u7684\u306b\u76e3\u8996\u3057\u305f\u3044\u300d<\/li>\n\n\n\n<li>\u300c\u671f\u9650\u5207\u308c\u306b\u306a\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u2026\u300d<\/li>\n\n\n\n<li>\u300c\u8907\u6570\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u4e00\u62ec\u3067\u7ba1\u7406\u3057\u305f\u3044\u300d<\/li>\n\n\n\n<li>\u300cLet&#8217;s Encrypt\u306e\u901a\u77e5\u30e1\u30fc\u30eb\u3067\u52a9\u304b\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u300d<\/li>\n<\/ul>\n\n\n\n<p>\u305c\u3072\u6700\u5f8c\u307e\u3067\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u306d\uff01<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"318\" height=\"320\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4.png\" alt=\"\" class=\"wp-image-9238\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4.png 318w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4-298x300.png 298w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4-100x100.png 100w\" sizes=\"auto, (max-width: 318px) 100vw, 318px\" \/><\/figure><\/div>\n\n\n<p class=\"has-text-align-center\">\u5e74\u672b\u5e74\u59cb\u306f\u30b3\u30ed\u30ca\u3067\u4e88\u5b9a\u304c\u5439\u3063\u3068\u3073\u2026<br>\u30c9\u30e9\u30af\u30a811s\u771f\u306e\u30e9\u30b9\u30dc\u30b9\u3092\u5012\u3057\u307e\u3057\u305f\ud83d\ude0a<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u901a\u77e5\u7528\u30e1\u30fc\u30eb\u3092\u3064\u304f\u308b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_5.png\" alt=\"\" class=\"wp-image-14908\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_5.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_5-300x169.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u4eca\u56de\u306f<code>Artisan<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304b\u3063\u3066<code>SSL<\/code>\u8a3c\u660e\u66f8\u306e\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3066\u901a\u77e5\u3059\u308b\u306e\u3067\u3001\u5148\u306b\u30e1\u30fc\u30eb\u90e8\u5206\uff08<code>Mailable<\/code>\uff09\u3092\u3064\u304f\u3063\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>php artisan make:mail SSLCertificateChecked<\/strong><\/pre>\n\n\n\n<p>\u3059\u308b\u3068\u3001<code>app\/Mail\/SSLCertificateChecked.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>&lt;?php<br><br>namespace App\\Mail;<br><br>use Carbon\\Carbon;<br>use Illuminate\\Bus\\Queueable;<br>use Illuminate\\Contracts\\Queue\\ShouldQueue;<br>use Illuminate\\Mail\\Mailable;<br>use Illuminate\\Mail\\Mailables\\Content;<br>use Illuminate\\Mail\\Mailables\\Envelope;<br>use Illuminate\\Queue\\SerializesModels;<br><br>class SSLCertificateChecked extends Mailable<br>{<br>    use Queueable, SerializesModels;<br><br>    <em>\/**<br>     * Create a new message instance.<br>     *\/<br>    <\/em>public function __construct(private $host, private Carbon $dt)<br>    {}<br><br>    <em>\/**<br>     * Get the message envelope.<br>     *\/<br>    <\/em>public function envelope(): Envelope<br>    {<br>        $to = 'test@example.com';<br>        $subject = $this-&gt;getContent();<br><br>        return new Envelope(<br>            to: $to,<br>            subject: $subject,<br>        );<br>    }<br><br>    <em>\/**<br>     * Get the message content definition.<br>     *\/<br>    <\/em>public function content(): Content<br>    {<br>        return new Content(<br>            htmlString: $this-&gt;getContent(),<br>        );<br>    }<br><br>    <em>\/**<br>     * Get the attachments for the message.<br>     *<br>     * @return array&lt;int, \\Illuminate\\Mail\\Mailables\\Attachment&gt;<br>     *\/<br>    <\/em>public function attachments(): array<br>    {<br>        return [];<br>    }<br><br>    private function getContent(): string<br>    {<br>        $days_in_days = (int) round(<br>            now()-&gt;diffInDays($this-&gt;dt)<br>        );<br><br>        return '\u3010'. $this-&gt;host .'\u3011\u6709\u52b9\u671f\u9650\u304c\u300c'. $days_in_days .'\u65e5\u5f8c\u300d\u306b\u5207\u308c\u307e\u3059\u3002';<br>    }<br>}<\/strong><\/pre>\n\n\n\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306b<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u3069\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u30c1\u30a7\u30c3\u30af\u3057\u305f\u304b<\/li>\n\n\n\n<li>\u305d\u306e\u30c9\u30e1\u30a4\u30f3\u306e\u8a3c\u660e\u66f8\u304c\u5207\u308c\u308b\u306e\u306f\u4f55\u65e5\u5f8c\u304b<\/li>\n<\/ul>\n\n\n\n<p>\u3092\u9001\u4fe1\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_4.png\" alt=\"\" class=\"wp-image-14906\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_4-300x169.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u7d9a\u3044\u3066\u3001\u30e1\u30a4\u30f3\u306e\u72ec\u81ea\u306e\u30b3\u30de\u30f3\u30c9\u300c<strong>CheckSSLCertificateCommand<\/strong>\u300d\u3092\u3064\u304f\u308a\u307e\u3059\u3002<br>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>php artisan make:command CheckSSLCertificateCommand<\/strong><\/pre>\n\n\n\n<p>\u3059\u308b\u3068\u3001<code>app\/Console\/Commands\/CheckSSLCertificateCommand.php<\/code>\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u4e2d\u8eab\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>&lt;?php<br><br>namespace App\\Console\\Commands;<br><br>use App\\Mail\\SSLCertificateChecked;<br>use Carbon\\Carbon;<br>use Illuminate\\Console\\Command;<br>use Illuminate\\Support\\Facades\\Cache;<br>use Illuminate\\Support\\Facades\\Mail;<br>use Illuminate\\Support\\Str;<br><br>class CheckSSLCertificateCommand extends Command<br>{<br>    const <em>CHECK_URLS <\/em>= [ \/\/ \u30c1\u30a7\u30c3\u30af\u3059\u308b\u3059\u308bURL<br>        'https:\/\/amazon.co.jp',<br>        'https:\/\/google.com',<br>        'https:\/\/yahoo.co.jp',<br>    ];<br><br>    <em>\/**<br>     * The name and signature of the console command.<br>     *<br>     * @var string<br>     *\/<br>    <\/em>protected $signature = 'check:ssl-certificate';<br><br>    <em>\/**<br>     * The console command description.<br>     *<br>     * @var string<br>     *\/<br>    <\/em>protected $description = 'SSL\u8a3c\u660e\u66f8\u306e\u6709\u52b9\u671f\u9650\u3092\u78ba\u8a8d\u3057\u307e\u3059';<br><br>    <em>\/**<br>     * Execute the console command.<br>     *\/<br>    <\/em>public function handle()<br>    {<br>        $url = $this-&gt;getCheckUrl();<br><br>        if(Str::<em>length<\/em>($url) === 0) {<br><br>            $this-&gt;error('URL\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f');<br>            return;<br><br>        }<br><br>        $this-&gt;checkSSLCertificate($url);<br><br>    }<br><br>    private function getCheckUrl()<br>    {<br>        $lastIndex = Cache::get('last_index', 0);<br>        $nextIndex = ($lastIndex + 1) % count(self::<em>CHECK_URLS<\/em>);<br>        Cache::put('last_index', $nextIndex);<br><br>        return self::<em>CHECK_URLS<\/em>[$nextIndex] ?? '';<br>    }<br><br>    private function checkSSLCertificate($url)<br>    {<br>        $host = parse_url($url, <em>PHP_URL_HOST<\/em>);<br>        $sslUrl = 'ssl:\/\/'. $host .':443';<br>        $streamContext = stream_context_create([<br>            'ssl' =&gt; ['capture_peer_cert' =&gt; true]<br>        ]);<br><br>        try {<br><br>            $fp = stream_socket_client(<br>                $sslUrl,<br>                $errno,<br>                $errStr,<br>                30,<br>                <em>STREAM_CLIENT_CONNECT<\/em>,<br>                $streamContext<br>            );<br>            $certificate_params = stream_context_get_params($fp);<br>            $certification_data = openssl_x509_parse($certificate_params['options']['ssl']['peer_certificate']);<br>            $timestamp = $certification_data['validTo_time_t'];<br><br>        } catch (\\Exception $e) {<br><br>            $this-&gt;error('[\u5931\u6557] SSL\u8a3c\u660e\u66f8\u306e\u53d6\u5f97: ' . $e-&gt;getMessage());<br>            return;<br><br>        }<br><br>        $dt = Carbon::<em>createFromTimestamp<\/em>($timestamp);<br>        $host = parse_url($url, <em>PHP_URL_HOST<\/em>);<br><br>        Mail::send(new SSLCertificateChecked($host, $dt));<br><br>        $this-&gt;info('Done!');<br><br>    }<br>}<\/strong><\/pre>\n\n\n\n<p>\u3053\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u3001\u4ee5\u4e0b2\u3064\u3067\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><em>CHECK_URLS<\/em>\u304b\u3089\u9806\u756a\u306b1\u3064\u305a\u3064URL\u3092\u53d6\u5f97<\/li>\n\n\n\n<li>SSL\u8a3c\u660e\u66f8\u306e\u60c5\u5831\u3092\u53d6\u5f97<\/li>\n<\/ol>\n\n\n\n<p>\u3061\u306a\u307f\u306b\u4eca\u56de<code>openssl_x509_parse<\/code>\u3068\u3044\u3046\u6a19\u6e96\u95a2\u6570\u304c\u3042\u308b\u3053\u3068\u3092\u77e5\u308a\u307e\u3057\u305f\u3002<br>PHP\u306f\u3044\u308d\u3044\u308d\u63c3\u3063\u3066\u3044\u307e\u3059\u306d\ud83d\ude0a<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306b\u3001<code>openssl_x509_parse<\/code>\u3092\u4f7f\u3046\u3068\u3001<code>phpstorm<\/code>\u304c\u3061\u3087\u3063\u3068\u3057\u305f\u8b66\u544a\u3092\u51fa\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3069\u3046\u3084\u3089\u3001\u300c<strong>composer.json\u306bext-openssl\u3092\u5165\u308c\u3068\u304d\u306a\uff01<\/strong>\u300d\u3063\u3066\u3053\u3068\u3060\u3063\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{<br>    \"name\": \"laravel\/laravel\",<br>    \"type\": \"project\",<br>    \"description\": \"The skeleton application for the Laravel framework.\",<br>    \"keywords\": [\"laravel\", \"framework\"],<br>    \"license\": \"MIT\",<br>    \"require\": {<br>        \"php\": \"^8.2\",<br>        \"laravel\/framework\": \"^11.0\",<br>        \"laravel\/tinker\": \"^2.9\",<br>        <strong>\"ext-openssl\": \"*\"<\/strong><br>    },<\/pre>\n\n\n\n<p>\u3064\u307e\u308a\u306f\u300c<strong>openssl\u304c\u4f7f\u3048\u308b\u74b0\u5883\u3058\u3083\u306a\u3044\u3068\u30c0\u30e1\u3088<\/strong>\uff01\u300d\u3063\u3066\u3053\u3068\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p>\u3067\u306f\u3001\u4eca\u56de\u306f\u77ed\u3044\u3067\u3059\u304c\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/test_base.png\" alt=\"\" class=\"wp-image-14910\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/test_base.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/test_base-300x169.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n<p>\u5b9f\u969b\u306e\u904b\u7528\u3067\u306f\u81ea\u52d5\u30bf\u30a4\u30de\u30fc\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u624b\u52d5\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong><em>php artisan <\/em>check:<em>ssl<\/em>-<em>certificate<\/em><\/strong><\/pre>\n\n\n\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"758\" height=\"67\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_1.png\" alt=\"\" class=\"wp-image-14832\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_1.png 758w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_1-300x27.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/figure>\n\n\n\n<p>\u306f\u3044\uff01<br>\u51e6\u7406\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3067\u306f\u3001\u30e1\u30fc\u30eb\u306e\u65b9\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u3069\u3046\u306a\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n\n\n\n<figure class=\"wp-block-image size-full image-border-3\"><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"170\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_2.png\" alt=\"\" class=\"wp-image-14835\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_2.png 458w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_2-300x111.png 300w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/figure>\n\n\n\n<p>\u306f\u3044\uff01<br>\u3061\u3083\u3093\u3068\u30e1\u30fc\u30eb\u304c\u5c4a\u3044\u3066\u3044\u307e\u3057\u305f\ud83d\ude0a<\/p>\n\n\n\n<p>\u3067\u306f\u3001\u6b21\u306e\u30c9\u30e1\u30a4\u30f3\u30c1\u30a7\u30c3\u30af\u304c\u3067\u304d\u308b\u304b\u3082\u78ba\u8a8d\u3057\u305f\u3044\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3082\u3046\u4e00\u5ea6\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u3046\u307e\u304f\u3044\u304f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n\n\n\n<figure class=\"wp-block-image size-full image-border-3\" id=\"image-border-3\"><img loading=\"lazy\" decoding=\"async\" width=\"373\" height=\"97\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_3.png\" alt=\"\" class=\"wp-image-14840\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_3.png 373w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/laravel_check_ssl_certificate_3-300x78.png 300w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/figure>\n\n\n\n<p>\u306f\u3044\uff01<br><code>amazon.com\u306e<\/code>\u6b21\u306f\u3001<code>google.com<\/code>\u304c\u30c1\u30a7\u30c3\u30af\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\ud83d\ude0a<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/suggestion_base.png\" alt=\"\" class=\"wp-image-14912\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/suggestion_base.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/suggestion_base-300x169.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u7e70\u308a\u8fd4\u3057\u306b\u306a\u308a\u307e\u3059\u304c\u3001<code>HTTPS<\/code>\u304c\u4f7f\u3048\u306a\u3044\u3068\u30d6\u30e9\u30a6\u30b6\u304c\u8b66\u544a\u3092\u51fa\u3059\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u8a3c\u660e\u66f8\u304c\u5207\u308c\u3066\u3057\u307e\u3046\u3068\u3001<strong>\u96c6\u5ba2\u306b\u30de\u30a4\u30ca\u30b9\u3067\u3059\u3002<\/strong><\/p>\n\n\n\n<p><code>Let's Encrypt<\/code>\u306f\u7121\u6599\u3067\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092<code>HTTPS<\/code>\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u304c\u30012025\u5e746\u67084\u65e5\u3092\u3082\u3063\u3066\u671f\u9650\u5207\u308c\u30e1\u30fc\u30eb\u304c\u901a\u77e5\u3055\u308c\u306a\u304f\u306a\u308a<strong>\u300c\u4e00\u5ea6\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3048\u3070\u5b89\u5fc3\u300d\u3068\u3044\u3046\u72b6\u6cc1\u3067\u306f\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001\u3082\u3057\u8a3c\u660e\u66f8\u3060\u3051\u3067\u306a\u304f\u30b5\u30a4\u30c8\u30c0\u30a6\u30f3\u306e\u5b9a\u671f\u30c1\u30a7\u30c3\u30af\u306a\u3069\u306e\u81ea\u52d5\u5316\u3092\u3054\u5e0c\u671b\u3067\u3057\u305f\u3089\u3044\u3064\u3067\u3082\u304a\u554f\u3044\u5408\u308f\u305b\u3088\u308a\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\uff01\ud83d\ude0a<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u304a\u308f\u308a\u306b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/last_comment_base.png\" alt=\"\" class=\"wp-image-14915\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/last_comment_base.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2025\/01\/last_comment_base-300x169.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>Laravel<\/code>\u3067SSL\u8a3c\u660e\u66f8\u30c1\u30a7\u30c3\u30af\u3092\u81ea\u52d5\u5316\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u5b9f\u3092\u8a00\u3046\u3068\u3001\u4eca\u56de\u306e\u6a5f\u80fd\u306f<code>GAS<\/code>\uff08<code>Google Apps Script<\/code>\uff09\u3067\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u6599\u91d1\u304c\u4e0d\u8981\u3060\u304b\u3089\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p>\u3067\u3082\u30c0\u30e1\u3067\u3057\u305f\ud83d\ude31<br><code>HTTP<\/code>\u30a2\u30af\u30bb\u30b9\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u8a3c\u660e\u66f8\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3067\u304d\u306a\u304b\u3063\u305f\u3093\u3067\u3059\u306d\u2026\uff08\u3082\u3057\u65b9\u6cd5\u3092\u77e5\u3063\u3066\u3044\u308b\u65b9\u304c\u3044\u305f\u3089\u3001\u305c\u3072\u6559\u3048\u3066\u304f\u3060\u3055\u3044\uff01\uff09<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u8a18\u4e8b\u306f\u5f53\u521d\u304b\u3089\u5927\u5e45\u306b\u5909\u66f4\u3057\u3066\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305c\u3072<code>Laravel<\/code>\u3060\u3051\u3067\u306a\u304f\u3001\u3044\u308d\u3093\u306a\u65b9\u6cd5\u3067\u3082\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n\n\n\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"306\" height=\"320\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png\" alt=\"\" class=\"wp-image-3566\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1.png 306w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/04\/no_1-287x300.png 287w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/figure><\/div>\n\n\n<p class=\"has-text-align-center\">\u300c\u4eca\u56de\u306e\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1\u753b\u50cf\u304b\u3089<br>\u30c7\u30b6\u30a4\u30f3\u3067\u52c9\u5f37\u3057\u305f\u300e\u30ac\u30a4\u30c9\u7dda\u300f\u3092\u4f7f\u3063\u3066\u307e\u3059\uff01\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u5148\u65e5\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u7121\u6599\u3067HTTPS\u5316\u3067\u304d\u308b\u6709\u540d\u30b5\u30fc\u30d3\u30b9\u300cLet&#8217;s Encrypt\u300d\u304b\u3089\u3068\u3066\u3082\u91cd\u8981\u306a\u30e1\u30fc\u30eb\u304c\u6765\u3066\u3044\u307e\u3057\u305f\u3002 \uff08\u629c\u7c8b\uff09As  &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=14628\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Laravel 11.x\u3011SSL\u671f\u9650\u5207\u308c\u30fb\u76e3\u8996\u30b3\u30de\u30f3\u30c9\u3092\u3064\u304f\u308b\u65b9\u6cd5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":14897,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-14628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/14628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14628"}],"version-history":[{"count":293,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/14628\/revisions"}],"predecessor-version":[{"id":14932,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/14628\/revisions\/14932"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/14897"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}