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.

Docker+nginx+Laravel シンボリックリンク

Last updated at Posted at 2023-02-04

以前したミスを忘れていてなんやかんや5時間試行錯誤したのち、突然思い出したのでもう忘れないようにメモ

storageに対してのシンボリックリンクを貼る方法を調べると基本的に

php artisan storage:link

こいつが出てくるのでphpの方でコピペしてやってしまいがちだが、これではnginxコンテナの方で間違ったルーティングがされてしまうため、
image.png
nginxのコンテナに入って

cd usr/share/nginx/html/public
ln -s /usr/share/nginx/html/storage/app/public storage

こう。
image.png
以上。

試行錯誤の中で、アクセス権限やnginxの仕組みについて少し理解が深まった。

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?