NOTE: Since QGIS 2.14 this does not work anymore. Trying to find solution, if anyone has done this, please comment below
My goal was to setup latest QGIS Server (2.12) on Windows 10 for use with Extended QGIS Web Client (EQWC). For that purpose I also needed Apache and PHP (>=5.5) with some specific configuration.

32bit version of OSGeo4W contains all three packages, but Apache and PHP are very old and so not suitable for EQWC. So I did separate install of Apache and PHP and then only QGIS Server with 64 bit OSGeo4W.

Apache 2.4 and PHP 5.6

Follow instructions on this post – http://lifeofageekadmin.com/how-install-apache-2-4-php-5-6-and-mysql-5-6-26-on-windows-10/ (install 64bit versions in both cases, you can skip MySQL part)

Apache configuration

Beside editing httpd.conf explained in post above, make also following changes:

Apache default port. Only change this if you wish Apache to listen to HTTP port other than default 80. In my case I did a change to port 8080, since I’m having IIS on default port 80.

change line:

Listen 80

to (desired port number):

Listen 8080

ScriptAlias

change line:

ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"

to:

ScriptAlias /cgi-bin/ "c:/OSGeo4W64/apps/qgis/bin/"

QGIS Server configuration

change part:

<Directory "c:/Apache24/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

to:

<Directory "c:\OSGeo4W64\apps\qgis\bin">
SetHandler cgi-script
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
Require all granted
</Directory>

Cgi handler

change line:

#AddHandler cgi-script .cgi

to:

AddHandler cgi-script .cgi .pl .exe

Add this to fix performance issue

# Apparently this fixes an issue with Apache 2.4.6 on Windows hanging
# when serving requests from Internet Explorer 10/11.
# see
http://stijndewitt.wordpress.com/2014/01/10/apache-hangs-ie11/
AcceptFilter http none
AcceptFilter https none

 

QGIS Server

Run 64bit installer from OSGeo4W – http://trac.osgeo.org/osgeo4w/. Choose advanced installation, from web and then select QGIS Server from Web part.

Last thing is to copy all DLL files from

c:\OSGeo4W64\bin\

to

c:\OSGeo4W64\apps\qgis\bin\

Test

Restart Apache server (from Services) and open a GetCapabilities request to QGIS Server

http://localhost:8080/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

You should receive standard WMS Capabilities XML response from QGIS Server.

Extra setup for Extended QGIS Web Client

Enable Apache rewrite module and insert Rewrite rules in httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so

RewriteEngine On
RewriteRule ^/proxy/(.+)$ /gisapp/admin/qgisproxy.php?map=$1.qgs [QSA,PT]
RewriteRule ^/gisapp/([^\.]+)$ /gisapp/index.php [PT]

Enable PHP PDO driver for PostgreSQL

uncomment this line (remove ; ) in C:\php\php.ini :

extension=php_pdo_pgsql.dll

Set PHP Error reporting

find error_reporting line in C:\php\php.ini and set value to:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

Restart Apache server. To finish setup of Extended QGIS Web Client go to GitHub repository and Wiki pages – https://github.com/uprel/gisapp/wiki.