We consider a two‐dimensional inviscid irrotational flow in a two layer fluid under the effects of gravity and interfacial tension. The upper fluid is bounded above by a rigid lid, and the lower fluid is bounded below by a rigid bottom. We use a spatial dynamics approach and formulate the steady Euler equations as a Hamiltonian system, where we consider the unbounded horizontal coordinate x as a time‐like coordinate. The linearization of the Hamiltonian system is studied, and bifurcation curves in the (β,α)‐plane are obtained, where α and β are two parameters. The curves depend on two additional parameters ρ and h, where ρ is the ratio of the densities and h is the ratio of the fluid depths. However, the bifurcation diagram is found to be qualitatively the same as for surface waves. In particular, we find that a Hamiltonian‐Hopf bifurcation, Hamiltonian real 1:1 resonance, and a Hamiltonian 02‐resonance occur for certain values of (β,α). Of particular interest are solitary wave solutions of the Euler equations. Such solutions correspond to homoclinic solutions of the Hamiltonian system. We investigate the parameter regimes where the Hamiltonian‐Hopf bifurcation and the Hamiltonian real 1:1 resonance occur. In both these cases, we perform a center manifold reduction of the Hamiltonian system and show that homoclinic solutions of the reduced system exist. In contrast to the case of surface waves, we find parameter values ρ and h for which the leading order nonlinear term in the reduced system vanishes. We make a detailed analysis of this phenomenon in the case of the real 1:1 resonance. We also briefly consider the Hamiltonian 02‐resonance and recover the results found by Kirrmann. Copyright © 2016 John Wiley & Sons, Ltd.