0

I am trying to access the Yii2 framework's auto code generator (Gii) and I need the IP address for the Cloud9 workspace server I am on. http://www.yiiframework.com/doc-2.0/guide-start-gii.html

I tried doing an "echo $IP" from the CLI and it gives me a 0.0.0.0 but that does not work. When I try to add it here: http://prntscr.com/8xvxax I get this "Forbidden 403" message: http://prntscr.com/8xvxz9

How do I get the correct IP address???

Dean Friedland
  • 773
  • 2
  • 12
  • 32
  • The address you need to set in Yii's config is not the server's address, it's the address of the computer you're running the browser on. Definitely not the "0.0.0.0". – Beowulfenator Nov 01 '15 at 21:34
  • So you mean one of these should work? http://prntscr.com/8y1k32 – Dean Friedland Nov 02 '15 at 04:38
  • Unfortunately it does not. – Dean Friedland Nov 02 '15 at 04:41
  • Open https://www.whatismyip.com/ in your browser, it should give you the right address. If all else fails, you can temporarily try allowing _all_ addresses to access gii (add "*" to the list). – Beowulfenator Nov 02 '15 at 08:36
  • Dude!!! Wildcard worked! You have no idea how many tutorials and how much research I did to try to find the answer to this before asking the question. You are the man! Seriously thanks! – Dean Friedland Nov 02 '15 at 15:09

3 Answers3

0

"Open whatismyip.com in your browser, it should give you the right address. If all else fails, you can temporarily try allowing all addresses to access gii (add "*" to the list)."

<<<<< This was the answer thanks to Beowulfenator

Dean Friedland
  • 773
  • 2
  • 12
  • 32
0

You can use curl from the Cloud9 terminal to echo your VM's external IP. There are a number of services that will return your public IP. Here are a few:


curl icanhazip.com
curl ipecho.net/plain
curl ifconfig.me
curl api.ipify.org
wyattis
  • 1,287
  • 10
  • 21
0
'allowedIPs' => ['*']

It will work!