开发者

Symlinking problem

开发者 https://www.devze.com 2022-12-09 13:18 出处:网络
Hey dudes.i am having this problem while symlinking. I have successfully deployed a ruby on rails a开发者_运维技巧pplication on server and all the migrations are done. It is deployed with phusion pass

Hey dudes.i am having this problem while symlinking. I have successfully deployed a ruby on rails a开发者_运维技巧pplication on server and all the migrations are done. It is deployed with phusion passenger. The application is in /home/username/rails_apps/myapp. I want to symlink it to a subdomain in my site. the path to subdomain is /home/username/public_html/subdom. So i used this command to symlink it. ln -s '/home/username/rails_apps/myapp/public/' '/home/username/public_html/subdom'

when it is done, it creates http://subdom.maxsy.net/public but it is supposed to be accessible by http://subdom.maxsy.net/

anybody have a sensible explanation for this problem? thanks


If /home/username/public_html/subdom already exists as a directory, the symlink does not replace the directory: instead, you get /home/username/public_html/subdom/public as a symlink pointing to /home/username/rails_app/myapp.

Since it appears that you really do want to replace /home/username/public_html/subdom by the symlink, you must first remove the /home/username/public_html/subdom directory before running ln -s /home/username/rails_app/myapp /home/username/public_html/subdom.


I think you just have one extra /, and possibly an existing subdom

rm -f /home/username/public_html/subdom
ln -s /home/username/rails_apps/myapp/public /home/username/public_html/subdom
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号