-
Notifications
You must be signed in to change notification settings - Fork 24
Unable to use site URL to connect to Craft nitro #450
Comments
I have the same issue on Mac. Just installed Nitro (running on alternative port 8080 for http). I have Valet installed too, maybe that has something to do with it? |
I found (from my above) By running: If you see your craft website here and IP address - then you can use the IP address instead of the site name to access it. |
I already tried that but it doesn't work for me because I get the following error when trying to go to the IP url.
|
@TomDeSmet This is kinda out of my depth - it has not been a easy set up on my end (using windows).... But, check everything is running as required I guess?? Is the DB running? Check Docker Command: If they have stopped you can start the process by using |
Everything’s running fine. Not getting any errors of any meaning in the containers. I already stopped valet and restarted all containers. Nothing… |
@TomDeSmet what output do you get when you run the command Should be: What error do you get once you try and go to that IP address that is listed - if it is listed? |
@wallythewebdev as stated in a previous post above:
|
Valet and Nitro will conflict, if you try
The bridge command looks at your local machine IP (your laptop) and allows you to share a site on the network with another device (e.g. iPad or iPhone). Nitro runs everything in localhost/127.0.0.1 so its not public to people on your network without the bridge command. |
Hi @jasonmccallister - Thanks for the reply. Thanks for mentioning the
Do you have any suggestions for how to debug the above (it worked yesterday after a fresh install). Thanks |
I already tried that and strange enough, now it works with the added port. |
@wallythewebdev Check your host file, it should contain:
|
Host file does not contain that: I manually added it and can access it from http://tutorial.nitro/ (which is great so thanks). But this does make me wonder @jasonmccallister @TomDeSmet - is there a command missing to allow Nitro to update the host files & does this mean that Nitro needs to edit host files when it is started any suggestions? |
My host file was edited when I added my project. So it's definitely possible. It prompts for your password when adding/creating a site to modify your host file. |
#@wallythewebdev There is a technical limitation on Windows that does not allow us to edit the hosts file. This page has more details on how to use Nitro with Windows https://craftcms.com/docs/nitro/2.x/windows.html Glad you got it sorted! |
@TomDeSmet - Thanks for the suggestion - running @jasonmccallister Ah that all makes way more sense now - thanks for the advice and pointing to the Docs. Can I make a small UI suggestion for windows users regarding the docs, I know writing docs is not an easy task, and there is allot of information packed into them, but given the slightly different install process for windows and caveats (regarding limitations) - it might be best to separate out the docs into separate pages for Windows and Mac/Linux installs of Nitro. One of the issues I came across was trying to piece together info from different doc pages instead of it being in one controlled flow of information that follows the install process. Just some UX feedback, not a criticism, and I'm really grateful for the help you've given here. |
Thank you and that is probably a good suggestion @wallythewebdev, I'm going to ping @mattstein and see if this is something he wants to add/improve on the documentation. If we have this working, I think we are ok to close this issue out? |
@jasonmccallister Yeah great and thanks for your help and @TomDeSmet as well - if you want input on writing the docs - happy to help :) |
Thanks @wallythewebdev! If I’m understanding right, you’re saying it’d be easier to navigate Nitro + Windows docs if they were visually separated by that OS. I get that—there were enough Windows caveats that we separated out the install instructions by OS, and added that Development with Nitro and WSL2 page so we could (hopefully) call those things out clearly. The ultimate goal, and the reason I’m hesitant to segregate the docs by OS, is to rejoin the docs flow for daily usage that shouldn’t vary significantly from one OS to another. If there are more nuanced issues you had finding bits of information that were there I’d like to understand and address them, but I’m not sure about splitting the docs out by operating system. Let me know if I’m missing your point or if the unified-docs goal seems out of touch with reality! :) |
Hi @mattstein Thanks for the reply. I'll spend a little time over the next coming days review the doc flow for installation and see if there are any instances I can pin point specifically. I can see why you'd be hesitant to separate the docs into different pages for different installs, but I think some of the information stored on https://craftcms.com/docs/nitro/2.x/windows.html could be included during the install process and not on a separate page which has led to me scrabbling for answers (I'm also fully aware that this could just be a case of me being a bad user, so these are only suggestions). Also, on that note, since there is already a specific page for the Caveats of Windows, it might serve the user to have this page extended with common windows debugging solutions. The one nuance that drove me loopy was not knowing that I'd need to update the host files (this made me second guess the whole install process). Annoyingly (and this might be me being a bad user), I did notice that it had prompted me to do so after the this was compounded by the details regarding the host file being mixed in with Certificates, I think separating these two out into two points and emphasizing when you'd be prompted to edit the host files would help (maybe?): Thanks again for touching base, I really apricate you taking the time and fully acknowledge that I might be totally wrong on the points above. |
Description
I cannot seem to use the SITE URL that I selected during the craft set up to access the craft website.
OR (maybe the issue is) - Nitro has not configured the host files to recognize the IP address of the site as the SITE URL
TLDR:
Q) is there a way to find out what IP address the nitro site is running on - like
nitro open <sitename>
?After posting the question I managed to find the answer to the Site IP address question:
By running:
nitro bridge
it will output the the IP address of the websites running on your machineFrom docs: https://craftcms.com/docs/nitro/2.x/local-sharing.html
Q) is there a location to find out the sites details - or any errors to be addressed in its setup?
Q) can you download an earlier version of craft, or does the version of craft downloaded by Nitro match the version of PHP you set the project up with - so if you decide to run php 7.2 - Nitro downloads the version of Craft suited for PHP 7.2?
Steps to reproduce
nitro create <sitename>
nitro craft setup
& complete--
Any debugging steps would be really helpful (im very keen to use Nitro for local dev, but the set up has been bumpy) - thanks
The text was updated successfully, but these errors were encountered: