I would like to proxy some requests to the OS X machine from the Apache server using the configuration in the file .htaccessfor the Node.js application listening on the UNIX socket. I will use it in the development environment, and not in production, if this clarification is necessary.
The problem is that I'm not sure how to write RewriteRulefor her or even if it is possible.
Current .htaccessfile:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/socket.io
RewriteRule ^(.*)$ unix:/Users/xxx/xxx/nodejs.sock [P,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
There is a Node.js application in this UNIX juice, I see that the file is /Users/xxx/xxx/nodejs.sock=from the terminal (the =sign should indicate that this is a UNIX socket, which I think?). When you visit the path /socket.iofrom the browser, I still see the file index.php.
I assume that the problem should be in UNIX socket format.