When you say:
The nearest restaurant is just around the corner.
it is implied to be directions (you are not there), so envision the movement to the corner and past it. around indicates this. If you check the definition of around as a preposition, several will work depending on exact context.
The nearest restaurant is
just on the corner.
In this example you have a fixed location (on the corner being a specific place), so only on is needed. You would not use just in this context, as there is no time/action reference. More context maybe...
I was just on the corner, so I don't know why I did not see the restaurant.
It works here because I can move.