I'm developing a project locally with NodeJS on www.foo.com and want to call a PHP app on subdomain.foo.com.
It works but it's interpreted as CROSS-ORIGIN so it sends OPTIONS requests and I can't get the thrown error from PHP in the Network browser development tool.
My hosts
127.0.0.1 foo.com
127.0.0.1 subdomain.foo.com
Apache
// foo.com
<VirtualHost *:80>
ServerName foo.com
DocumentRoot "/path/to/my/nodejs/app"
<Location />
ProxyPass http://127.0.0.1:8080/
ProxyPassReverse http://127.0.0.1:8080/
</Location>
</VirtualHost>
// Symfony2 project on: subdomain.foo.com
<VirtualHost *:80>
ServerName subdomain.foo.com
DocumentRoot "/path/to/my/php/app"
<Directory /path/to/my/php/app>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app_dev.php [QSA,L]
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
ErrorLog "/Applications/MAMP/logs/subdomain-foo-error.log"
CustomLog "/Applications/MAMP/logs/subdomain-foo-access.log" common
</VirtualHost>
Any idea?