I have been trying to handle all requests via a NodeJS, except those going to the /admin directory via mod_proxy, but with no success.
This is the configuration I came up with, but it is not working.
<VirtualHost *:80>
ServerName domain.com
DocumentRoot /home/sites/domain.com/
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName domain.com
DocumentRoot /home/sites/domain.com/
ProxyRequests on
ProxyPassMatch ^/(.*)$ http://localhost:3000/
ProxyPassMatch ^/admin/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/home/sites/domain.com/php/public/$1 timeout=600
ProxyTimeout 600
SSLEngine on
SSLCertificateFile /home/keys/domain.com.crt
SSLCertificateKeyFile /home/keys/domain.com.key
</VirtualHost>