Friendifie's avatar

Shared web-host displays my user's root directory?

Hi there, Apparently my shared web-host wasn't running my Lumen API but I got it working... But, I'm experiencing one more problem and I don't know how to fix it. I think it's rooted into the Lumen project itself?

Is as quoted from my dead post related to a problem getting Lumen to run on my shared web-host:

https://laracasts.com/discuss/channels/lumen/lumen-works-on-shared-web-host-but-isnt-working :

Apparently I got it working now but it's forcing/showing my shared web-hosts path, I don't like that. It's a huge security risk for me. It's like:

https://api.mysite.com/home/myusername/public_html/another_folder/NewBlog/NewBlog

When I go to the root "/" it takes me to "/NewBlog" then once I replace the "NewBlog" it set with my route "status" or "test" it'll display their results on the screen.

Any advice? Thanks!

Please help me resolved this issue asap. Thanks!

0 likes
4 replies
Friendifie's avatar

@TRAY2 - How do I explain it... I know Lumen hides the /public/ in the URL so I don't have a problem keeping that.

I don't want to integrate my web-host's / with the Lumen API because I'd like to keep that in a sub-directory and when I call my API from my apps I want to reference: https://api.mysite.com/post/1000392.

Are we on the same page? Also, thanks so much for the reply!

Tray2's avatar

Then you probably should check on how to set up a subdomain and how to reroute to it.

Friendifie's avatar

@TRAY2 - Of course I know how to setup a subdomain and app traffic to my https://api.mysite.com/ goes to that directory where I want to put my Lumen project. The problem I’m experiencing is related to my Lumen project. In the URL it’s showing my whole web-host route in the URL bar. If I don’t do it that way then Lumen doesn’t work.

Shrugs 🤷🏻‍♂️ I’m so confused.

Please or to participate in this conversation.