Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub-domains: Inverse the symlink to point to the public/ dir from public_html for updates #27

Open
nelson6e65 opened this issue Sep 1, 2017 · 3 comments

Comments

@nelson6e65
Copy link
Contributor

Hi.

I'm using https://servicioshosting.com, and instructions works! 🤡

But... When I use git pull I get some issues, since public is a symbolic link and I have to make cp ... mv ... etc each time I update content in my public/ folder in my repo.

For sub-domains, I use a symbolic link as sub-domain "folder" to point to my awesome/public/ folder directly:

ln -s ~/apps/awesome/public ~/public_html/awesome

It's working like a charm; no need to modify the routes in my public/index.php.

My questions are...

There something I'm not considering that will become a trouble later?

It only works in https://servicioshosting.com and may fail in other hosting providers?

@josevavia
Copy link

josevavia commented Mar 27, 2018

I have tested your configuration on a godaddy server, but I have the following error:

"symbolic link not allowed or link target not accessible"

So I imagine that not all the hosting are prepared to support symlinks towards directories outside of public_html / www

Anyway, it is a good setup if the server allows it, more simple to get updated the sources

@macguirerintoul
Copy link

This method works on Web Hosting Canada, and it does make updating the project much easier. @josevavia, are you sure it was your server that was causing the error, or could it have been the creation of the symbolic links? I also ran into that issue, but I was able to solve it by making sure permissions were set correctly and that the symbolic link directories did not exist before creating the symbolic link.

I was planning to update this guide for Laravel 5.6 and figured I would invert the symlink as well, since it seems like a nicer way to update projects. If there are any further issues with this method, please let me know - or maybe we could keep the original method as an alternate method in the case that the server doesn't allow this 'inverted' symlink.

@petehouston
Copy link
Owner

As I experience so far, only minor of shared hosting provides symlink.

And still, we always need to verify if public/index.php is loaded correctly or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants