Islamism is the problem, it is the ideology, the restoration of the caliphate the extermination of the Jews and the subjegation of the unbelievers is all part of that. The means to that end now is to bring about more allied Islamist regimes around the world ~ Saudi Arabia and Pakistan would be the two most dangerous countries to fall. Terrorism is the manifestation of this movement.
Identify the enemy, Islamism. Fight said enemy through use of both hard and soft power and solve the problem that drives wider support for their cause which is autocratic government in the Middle East.
Fighting against terror does not create more terrorists, killing jihadists does not make more jihadists, stepping back and allowing the swamp of despotism to fester discontent among the populace without other means of dissent than violence is the driving force here. Look at who the international terrorists of the world are, we are looking at wealthy men, who have the economic means to travel the world, the education to inflict harm and the ideological zeal that is only afforded by the luxury of not living in abject poverty. The fiction is that the terrorists of the world are the poor and the downtrodden; just look at the recent Harvard study of terrorist attacks around the globe by Alberto Abadie simply did not find such a link, rather factors of political freedom, ethnic conflict and geography played significant roles.
Iraq and Afghanistan will be means to an end in defeating terror not just because a lot of nihilists, fascists and jihadists are killed ~ but because the establishment of democratic society and respect for individual liberty is the only way to prevent the toppling of these already ambiguously hostile governments with more dangerous ones. The increase in terror in both of those countries following the fall of Saddams regime and the Taliban is to be expected; it is reactionary, a concerted effort to subvert and topple elected governments and bring about the types of chaos and sectarian violence from which they can be afforded sanctuary. If they fail to accomplish this before the national democratic governments become entrenched then the gains of terror will be lost and the number of attacks will also decrease. This transitional fluctuation in terror is the direct result of moving towards freer governments.
Don't try to reason with them or contemplate what we can do to appease the anger of jihadists ~ that will not solve any problems, granting concessions will only aid their cause and encourage more violence. Fight them on every front and expose them for what they really are; don't fall into the trap of having your governments policies dictated to by Islamist proxies.