We analyze the behavior of electromagnetic fields inside a resonant cavity by solving Einstein--Maxwell field equations. It is shown that the modified geometry of space-time inside the cavity due to a propagating mode can affect the propagation of a laser beam. It is seen that components of laser light with a shifted frequency appear originating from the coupling between the laser field and the mode cavity due to gravity. The analysis is extended to the case of an asymmetric resonant cavity taken to be a truncated cone. It is shown that a proper choice of the geometrical parameters of the cavity and dielectric can make the gravitational effects significant for an interferometric setup. This could make possible to realize table-top experiments involving gravitational effects.