Have some development hosts we're trying to run Apache/PHP and Node.js on. Ideally simple ProxyPass for node services running against local port should work, but for some reason I need to supply local network IP, localhost gives 503 error.
$ cat nodeproxy.conf
<Directory /public/np1/site>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<VirtualHost *:80>
ServerName np1.local.zaptech.org
DocumentRoot /public/np1/site
ProxyRequests on
# ProxyPass /np1/ http://localhost:1337/ <- doesn't work, 503 error
# ProxyPass /np1/ http://127.0.0.1:1337/ <- doesn't work, 503 error
ProxyPass /np1/ http://10.10.10.76:1337/
</VirtualHost>
$ cat sysd
[Unit]
Description=Node.js Example Server
[Service]
ExecStart=/bin/node /home/rickatech/node/example.js
Restart=always
RestartSec=10 # Restart service after 10 seconds if node service crashes
StandardOutput=syslog # Output to syslog
StandardError=syslog # Output to syslog
SyslogIdentifier=nodejs-ricktest
User=rickatech
Environment=NODE_ENV=production PORT=1337
[Install]
WantedBy=multi-user.target