I succesfully deployed a Laravel website onto a web server by cloning it into a directory at the same level as public_html (called laravel) and creating a symlink to the laravel/public directory into public_html, with this command: ln -s laravel/public public_html
This works great.
(通过将Laravel网站克隆到与public_html(称为laravel)相同级别的目录,并使用以下命令将指向laravel / public目录的符号链接创建到public_html,从而成功地将Laravel网站部署到Web服务器上: ln -s laravel/public public_html
这很好。)
Now I want to have a "test" version of the site for development, and I wanted to do the same.
(现在,我想要一个用于开发的网站“测试”版本,并且我想要这样做。)
- I cloned my project in a "laravel_dev" directory, same level as public_html and laravel directories.
(我将项目克隆到“ laravel_dev”目录中,该目录与public_html和laravel目录相同。)
- I created a public_html/dev directory.
(我创建了public_html / dev目录。)
- Now, I want to create a symlink of 'laravel_dev/public' into 'public_hmtl/dev' and here is where I am having trouble.
(现在,我想将“ laravel_dev / public”创建为“ public_hmtl / dev”的符号链接,这是我遇到麻烦的地方。)
If I do ln -s laravel_dev/public public_html/dev
It creates a file (not a directory) called public inside public_html/dev. (如果执行ln -s laravel_dev/public public_html/dev
它将在public_html / dev内部创建一个名为public的文件(而非目录)。)
I tried making the target go to laravel/public/dev, with the same result.
(我尝试使目标进入laravel / public / dev,结果相同。)
I double checked that laravel_dev/public directory exists and it is not empty. (我再次检查了laravel_dev / public目录是否存在,并且它不为空。)
I also tried removing the dev directory inside laravel/public/dev, and the result there is that it creates a file called dev inside laravel/public but it is not a directory. (我还尝试删除laravel / public / dev中的dev目录,结果是它在laravel / public中创建了一个名为dev的文件,但它不是目录。)
To clarify, my directory tree is something like this:
(为了澄清,我的目录树是这样的:)
www
|___public_html(1)/dev
|___laravel/public(1*)/dev
|___laravel_dev/public
I am positioned in www directory when I am executing the mentioned commands The (number) indicates symlink and the * indicates the "physical" directory.
(当执行上述命令时,我位于www目录中。(数字)表示符号链接,而*表示“物理”目录。)
Using this notation here is what I want to acomplish: (我要使用的符号是:)
www
|___public_html(1)/dev(2)
|___laravel/public(1*)/dev(2)
|___laravel_dev/public(2*)
ask by jokogarcia translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…