title: Apache 2.4 + FPM + Wordpress Multisite: URL Rewrite not working in admin
body: <p>I just moved a Wordpress multi-site from a Apache 2.4 Prefork + mod_php to a new server with Apache 2.4 Event + php-fpm.</p>
  
  <p>The site is working well on the frontend and it is a lot faster then before due to the CGI, but... the Wordpress administration panel is working just for the main site (and network administration).
  The admin area for the second site is no more working, but the frontend is working great.</p>
  
  <p>Examples</p>
  
  <ul>
  <li><a href="http://www.example.com/en/wp-admin/" rel="nofollow">http://www.example.com/en/wp-admin/</a> => works</li>
  <li><a href="http://www.example.com/en/wp-admin/post-new.php" rel="nofollow">http://www.example.com/en/wp-admin/post-new.php</a> => goes on error 404</li>
  </ul>
  
  <p>I tried to debug the rewrites, but the unique log I have (also using Debug Level 8) is</p>
  
  <pre><code>[proxy_fcgi:error] [pid 13700:tid 140381047965440] [client X.X.X.X:54354] AH01071: Got error 'Primary script unknown\n', referer: http://www.example.com/en/wp-admin/
  </code></pre>
  
  <p>Follwing my configurations.
  Any help appreciated. Thank you.</p>
  
  <p><strong>Virtual Host</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName www.example.com
  DocumentRoot "/srv/www/example.com/public_html"
  &lt;IfModule mpm_event_module&gt;
  ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/example.com/public_html/$1
  &lt;/IfModule&gt;
  &lt;Directory "/srv/www/example.com/public_html"&gt;
  AllowOverride all
  Require all granted
  &lt;/Directory&gt;
  ErrorLog /srv/www/example.com/logs/error_log
  TransferLog /srv/www/example.com/logs/access_log
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>.htaccess</strong></p>
  
  <pre><code>&lt;Files "xmlrpc.php"&gt;
  Order Allow,Deny
  Deny from all
  &lt;/Files&gt;
  
  # BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  Options +FollowSymLinks
  
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  
  # uploaded ﬁles
  RewriteRule ^([_0-9a-zA-Z-]+/)?ﬁles/(.+) wp-includes/ms-ﬁles.php?ﬁle=$2 [L]
  
  # add a trailing slash to /wp-admin
  RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
  
  RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(admin|content|includes).*) $2 [L]
  RewriteRule ^([_0-9a-zA-Z-]+]/)?(.*\.php)$ $2 [L]
  RewriteRule . index.php [L]
  &lt;/IfModule&gt;
  # END WordPress
  </code></pre>