0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Symfony】localでHTTPSのサーバーを立ち上げる

Posted at

はじめに

symfony castsを勉強していると、

symfony serve

を実行するとHTTPSのローカルサーバーが立ち上がる。
と説明がありましたが、自分の環境ではHTTPが立ち上がったので、その解決方法

解決方法

terminal
// このコマンドを実行する
symfony server:ca:install

それからsymfony serve実行するとhttpsになります。

なぜローカルサーバーでHTTPSを立ち上げる必要があるかについてドキュメントにはこう書かれていました。

Enabling TLS
Browsing the secure version of your applications locally is important to detect problems with mixed content early, and to run libraries that only run in HTTPS. Traditionally this has been painful and complicated to set up, but the Symfony server automates everything.
-和訳-
ローカルでアプリケーションの安全なバージョンを閲覧することは、混在コンテンツの問題を早期に検出し、HTTPSでのみ実行できるライブラリを実行するために重要です。従来、これを設定することは面倒で複雑でしたが、Symfonyサーバーはすべてを自動化します。

まとめ

symfony castsとてもいいコンテンツですが、PHP Storm使ってるからVSCode信者としては少し残念です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?