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

Access sites using hosts IP #176

Closed
fathonyfath opened this issue Jan 6, 2018 · 6 comments
Closed

Access sites using hosts IP #176

fathonyfath opened this issue Jan 6, 2018 · 6 comments

Comments

@fathonyfath
Copy link

Environment:

  • MacOS High Sierra
  • devilbox master-branch

It would be great if there is any way I can access my sites with hosts IP address since I'm using devilbox as my debug env to host my REST API and access it with my phone. It's hard to change /etc/hosts on my android phone without having root access.

Thank you.

@cytopia
Copy link
Owner

cytopia commented Jan 9, 2018

@fathonyfath unfortunately this is not easily possible. The devilbox is using Named Virtual Hosts for both nginx and apache.

So in order to do so you need to set the DNS resolver of your mobile to the one Devilbox provides (if that is possible with some kind of app).

I cannot think of any other possibility.
Maybe somebody else might come up with a solution here.

@stepgr
Copy link

stepgr commented Jan 15, 2018

I was ready to ask the same question. I use also sometimes bitnami stacks for testing purposes and in their setup (at least in the apache module ) they have some rewrite rules to rewrite urls to the actual location. This way you can access your environment even from WAN (if you want to show the work to an external user eg, but also inside the LAN which is not possible now with devilbox). I wiil have a look into it if I can make anything out of it.

@cytopia
Copy link
Owner

cytopia commented Jan 16, 2018

@stepgr I totally didn't think of rewrite rules. This is something that could for for localhost. Good one.

@stepgr
Copy link

stepgr commented Jan 16, 2018

@cytopia I tried to see how to make such rules for nginx but unfortunately my knowledge of docker is very limited I'm afraid. I can't figure out where the configuration of nginx lies in the devilbox directory. If you want , I can send you the apache rewrite rules from htaccess I also found a script online to convert it to nginx rules but I can't figure out where to put them to test!

@cytopia
Copy link
Owner

cytopia commented Feb 8, 2018

@stepgr sorry for the long waiting time. Please do send me those rules and I try to prepare something for you.

@cytopia
Copy link
Owner

cytopia commented May 5, 2018

#248

I am already working on this problem. Please find all relevant information in the newly created issue: #248

To reach a broader audience I will close this ticket and link it to the new one (which will be done with multiple related issues as well).

@cytopia cytopia closed this as completed May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants