I only remember this vaguely but it's been on my mind for the past few weeks so let's give it a shot. I remember seeing this movie in the early 2000s. There were human warships that carried fighters wandering around in space looking for some alien enemy. The fighters had something along the lines of a large chaingun instead of the nose section. There was one climatic battle where a human fighter that looked like an X-Wing fired some missiles at an alien cruiser and blew the thing to pieces. The human mothership's hanger bay was in the middle and the fighters would enter/exit through the nose of the ship. Any ideas what this might have been?
It sounds like the movie you're looking for is the 1999 film Wing Commander, based on the PC video game series of the same name.
It is the year 2454 and an interstellar war is raging between the Terran Confederation and the Kilrathi Empire, whose people, the cat-like Kilrathi, seek the complete eradication of the human race. (Wikipedia)
The fighters with the chaingun on the nose would be the Rapier fighters used by the Terrans. You can see it in the poster image above, but here's a closer look.
The fighters were launched from the Tiger Claw, a sort of space aircraft carrier with its hangar bay/runway running through the centre, facing forward, with the hangar doors near the prow of the ship.