Considering the chanting we hear ("Deh-shay, deh-shay bah-sah-rah, bah-sah-rah,") is Moroccan , I think we can assume the pit is is North Africa somewhere.
movies.stackexchange.com/users/382/Nobby
The pit in the Dark Knight Rises is located is near the fort of Mahendragarh in India.
It's located near Thar Desert in the Rajasthan state.
I have seen local news paper headlines of the Dark Knight Rises team visiting here for shooting...
movies.stackexchange.com/users/2093/Sagar
The pit, as was shown in the film, is located in Jodhpur, Rajasthan, India.
In the brief moment when Talia Al Ghul comes out of it, one can see the Mehrangarh Fort in the background.
Even Confirmed from Wkipedia
The third movie of The Dark Knight trilogy, The Dark Knight Rises, was partially shot around the Mehrangarh fort.
A few scenes included the prison well within which Bruce Wayne is shown to have been imprisoned.
There is one particular shot when Wayne emerges from the prison that actually gives a glimpse of the Mehrangarh Fort in the background.
The scene involving Ras Al Ghul also seem to be filmed in fort.
The inside of the pit is a famous Step well called Chand Baori which is in Dausa district, Rajasthan, India.(Borrowed answer from Quora ).
movies.stackexchange.com/users/1190/Ankit Sharma
The prison is located near the Mehrangarh fort of Jodhpur, Rajasthan, India.
I have visited this fort a couple of times as my maternal uncle resides there.
Actually, if you look closely to the frame when Bruce Wayne comes out of the pit you can see blue houses beside the fort.
That's because many of the houses in the city of Jodhpur are colored with blue lime.
That's the reason why Jodhpur is also known as 'The Blue City'.
I think that clears your doubt and answers your question as well.
movies.stackexchange.com/users/5302/Nikhil Joshi
The Pit is far from Gotham (Which, by the way is in New Jersey, not New York, just so people know).
It was filmed in India, but the film location and the actual in story location are not the same.
The Pit is officially in a 'Middle Eastern' Country, but it is never specified which.
This is meant to leave it intentionally vague, since DC has many fictional countries like Kahndaq (quoting Dc's wikia): "Kahndaq is an Arab country on the continent of Africa located between Egypt and Jordan."
except when you look at the Continent it is on in the side bar, it says Asia (which actually matches the real world map concept that the Middle East is considered part of Asia), and if you consider what it says, it essentially is Israel... though other references have Kahndaq frequently considered part of what is Iran.
This all convolutes matters, since Israel, Jordan, Iran, Egypt, Iraq (which also has DC fictional Qurac as a stand-in at times), and Libya (which has its own stand-in at times of Bialya, a near anagram) (among others) are all acknowledged to exist in DC as well... Since making it in a real country could be taken as offensive, Bialya has Queen Bee ruling it, and Kahndaq is ruled by Black Adam...
Qurac would seem the most likely place in DC's fictional Middle Eastern countries to place the Pit.
Note this part is only my theory, but since the Pit is a pastiche for multiple places in the mainstream Batman Mythos, and is further complicated by being filmed in India yet having a Moroccan Chant, and supposed to be in the Middle East, the conjecture is fairly sound with the available information.
Fun note:
Joker in the comics actually was given Diplomatic Immunity for a while by being declared Iran's UN Ambassador.
So, there is always still Iran, as well.
movies.stackexchange.com/users/16874/Jerome Davis
The background when he comes out of the well was clearly Mehangarh fort,Jodhpur.
But there is no well near by fort.
They made a wall in a round shape, so that it looks like a well but some scenes (inside well) were shot in Jaipur (chand baori), Just search "DEEPEST STEP WELL".
movies.stackexchange.com/users/8226/user8226
What is the geographic location of the pit Bruce Wayne is imprisoned in by Bane? Is this prison in Gotham or somewhere else? Bane and Bruce seems to travel between the two rather quickly. It seems like a Middle Eastern location when Talia's mother is dropped in.    Any ideas?
What is the geographic location of the pit Bruce Wayne is imprisoned in by Bane?
movies.stackexchange.com
<plot-explanation><the-dark-knight-rises>
movies.stackexchange.com/questions/3454
movies.stackexchange.com/users/1751/Jeff B
The prison is located near the Mehrangarh fort of Jodhpur, Rajasthan, India. The prison is located near the Mehrangarh fort of Jodhpur, Rajasthan, India. 
The prison is located near the Mehrangarh fort of Jodhpur, Rajasthan, India. If you look closely to the frame when Bruce Wayne comes out of the pit you can see blue houses beside the fort. Many of the houses in the city are colored with blue lime. That's the reason why Jodhpur is also known as 'The Blue City'.  