简体   繁体   English

在另一个符号链接的顶部创建一个符号链接

[英]Create a symlink top of the other symlink

I'm using GoDaddy shared hosting server to upload Laravel project from my local.我正在使用 GoDaddy 共享托管服务器从本地上传 Laravel 项目。 I decided to use symlink to link "laravel/public" directory to GoDaddy "public_html" by using Putty instead of changing directories within the hosting server.我决定使用符号链接将“laravel/public”目录链接到 GoDaddy“public_html”,方法是使用 Putty 而不是更改托管服务器中的目录。 Then, I realized that I need to link the picture storage folder inside "laravel/public".然后,我意识到我需要链接“laravel/public”中的图片存储文件夹。 so currently it looks like the below:所以目前它看起来像下面这样:

ln -s laravel/storage/app/public/cover_images laravel/public/storage/cover_images ln -s laravel/storage/app/public/cover_images laravel/public/storage/cover_images

ls->[~/laravel/public/storage] cover_images@ ls->[~/laravel/public/storage] cover_images@

ln -s laravel/public public_html ln -s laravel/public public_html

ls-> [~] public_html@ ls-> [~] public_html@

ls-> [~/public_html/storage] cover_images@ ls-> [~/public_html/storage] cover_images@

it works for displaying everything but cover_images@.它适用于显示除cover_images@以外的所有内容。 It looks to me fine by seeing directories.通过查看目录,我觉得很好。 If you see the image html source, it looks like如果你看到图像 html 源,它看起来像

<img src='/storage/cover_images/g_1540352310.png'>

and doesn't display it.并且不显示它。

Please help me!请帮我!

I just found the why it got 404 error.我刚刚找到了为什么会出现 404 错误。 So this is NOT the symlink issue.所以这不是符号链接问题。 please read the posted answer.请阅读发布的答案。

Storage in laravel says symlink - no such file Laravel 中的存储表示符号链接 - 没有这样的文件

thanks,谢谢,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM