<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Hosting multiple Express (node.js) apps on port 80	</title>
	<atom:link href="https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Tue, 17 Sep 2019 16:32:57 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: express - Alojar múltiples sitios web utilizando Node.js Express		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-480458</link>

		<dc:creator><![CDATA[express - Alojar múltiples sitios web utilizando Node.js Express]]></dc:creator>
		<pubDate>Tue, 17 Sep 2019 16:32:57 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-480458</guid>

					<description><![CDATA[[&#8230;] mejor que use nodo-http-proxy, para mantener las aplicaciones totalmente independientes? Consulte este post para una [&#8230;]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] mejor que use nodo-http-proxy, para mantener las aplicaciones totalmente independientes? Consulte este post para una [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: node.js - Ospitare più siti web utilizzando Node.js Express		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-479759</link>

		<dc:creator><![CDATA[node.js - Ospitare più siti web utilizzando Node.js Express]]></dc:creator>
		<pubDate>Mon, 03 Jun 2019 18:07:05 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-479759</guid>

					<description><![CDATA[[&#8230;] è meglio utilizzando nodo-http-proxy, per mantenere l&#8217;app totalmente indipendente? Vedere questo post per un confronto. Grazie @veggiesaurus nodo-http-proxy dovrebbe essere la strada da percorrere. Ti [&#8230;]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] è meglio utilizzando nodo-http-proxy, per mantenere l&#8217;app totalmente indipendente? Vedere questo post per un confronto. Grazie @veggiesaurus nodo-http-proxy dovrebbe essere la strada da percorrere. Ti [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Brad		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-472755</link>

		<dc:creator><![CDATA[Brad]]></dc:creator>
		<pubDate>Thu, 25 Jan 2018 23:27:57 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-472755</guid>

					<description><![CDATA[console.log(&quot;Holi&quot;)
Pretty cool stuff]]></description>
			<content:encoded><![CDATA[<p>console.log(&#8220;Holi&#8221;)<br />
Pretty cool stuff</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jan Mauler		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-451503</link>

		<dc:creator><![CDATA[Jan Mauler]]></dc:creator>
		<pubDate>Thu, 07 Jul 2016 14:53:04 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-451503</guid>

					<description><![CDATA[Thank you very much, this helped me a lot with finding a solution for running node.js apps as virtual hosts.]]></description>
			<content:encoded><![CDATA[<p>Thank you very much, this helped me a lot with finding a solution for running node.js apps as virtual hosts.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: It&#8217;s Node.js All the Way Down &#124; Jimbly&#039;s Technical		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-182694</link>

		<dc:creator><![CDATA[It&#8217;s Node.js All the Way Down &#124; Jimbly&#039;s Technical]]></dc:creator>
		<pubDate>Tue, 21 Oct 2014 00:40:46 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-182694</guid>

					<description><![CDATA[[&#8230;] Related but outdated examples of http-proxy &#8211; https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/ [&#8230;]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] Related but outdated examples of http-proxy &#8211; https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/ [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Cole		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-75181</link>

		<dc:creator><![CDATA[Cole]]></dc:creator>
		<pubDate>Thu, 26 Jun 2014 12:52:48 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-75181</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-17837&quot;&gt;Ivo Bathke&lt;/a&gt;.

I&#039;m definitely looking into this! Thanks for the article!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-17837">Ivo Bathke</a>.</p>
<p>I&#8217;m definitely looking into this! Thanks for the article!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kevin Freund		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-47615</link>

		<dc:creator><![CDATA[Kevin Freund]]></dc:creator>
		<pubDate>Wed, 21 May 2014 20:49:09 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-47615</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-17945&quot;&gt;ivarPrudnikov&lt;/a&gt;.

Or you could just start node give privileges to port 80 to the running user, using something like start-stop-daemon or setuid/setgid.  Just because a service account has access to port 80 does not mean it needs sudoer access.  For example, this is how a standard repo apache starts up using the apache/httpd user as a non-privileged user who still has access to port 80 due to the way the server was started through upstart.

Seems like the standard course of action, on *nix anyway, is to use a startup script that can access port 80 but do so using an unprivileged, no-login user.  This is in keeping with the &quot;default deny&quot; security mechanism of *nix.  The way I usually do it is create a user with access to NOTHING (disable shell login, ensure group membership is minimal, only set file/folder ownership over specific subtrees in the file system, etc.), then adding only the required permissions (such as permissions to write log files, any cron jobs running under that user account, etc).

Screwing around with IPTables IMHO just creates something else that can break, and will drive you crazy trying to figure out why ports aren&#039;t answering, particularly if there&#039;s an upstream firewall, such as the one provided by AWS in front of your servers.

Hope that helps.

In my case I&#039;m writing an API with Sails, and I&#039;m trying to wire up an upload node.js server (not written using Sails) on a different port, but somehow server-side redirect port 80 requests to the port that the upload server is on, because I don&#039;t want to have the user hitting multiple ports, particularly ports other than 80 and 443, since many firewalls don&#039;t allow outbound connections to arbitrary ports.

There&#039;s a way to do this with socket.io, by having socket.io listen for connections to the http server:
http://braindrivendevelopment.com/2013/09/24/node-js-how-to-run-express-and-socket-io-on-the-same-port/

I&#039;m trying to do something similar, but without breaking Sails standards.  If someone would like to enlighten me, please do.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-17945">ivarPrudnikov</a>.</p>
<p>Or you could just start node give privileges to port 80 to the running user, using something like start-stop-daemon or setuid/setgid.  Just because a service account has access to port 80 does not mean it needs sudoer access.  For example, this is how a standard repo apache starts up using the apache/httpd user as a non-privileged user who still has access to port 80 due to the way the server was started through upstart.</p>
<p>Seems like the standard course of action, on *nix anyway, is to use a startup script that can access port 80 but do so using an unprivileged, no-login user.  This is in keeping with the &#8220;default deny&#8221; security mechanism of *nix.  The way I usually do it is create a user with access to NOTHING (disable shell login, ensure group membership is minimal, only set file/folder ownership over specific subtrees in the file system, etc.), then adding only the required permissions (such as permissions to write log files, any cron jobs running under that user account, etc).</p>
<p>Screwing around with IPTables IMHO just creates something else that can break, and will drive you crazy trying to figure out why ports aren&#8217;t answering, particularly if there&#8217;s an upstream firewall, such as the one provided by AWS in front of your servers.</p>
<p>Hope that helps.</p>
<p>In my case I&#8217;m writing an API with Sails, and I&#8217;m trying to wire up an upload node.js server (not written using Sails) on a different port, but somehow server-side redirect port 80 requests to the port that the upload server is on, because I don&#8217;t want to have the user hitting multiple ports, particularly ports other than 80 and 443, since many firewalls don&#8217;t allow outbound connections to arbitrary ports.</p>
<p>There&#8217;s a way to do this with socket.io, by having socket.io listen for connections to the http server:<br />
<a href="http://braindrivendevelopment.com/2013/09/24/node-js-how-to-run-express-and-socket-io-on-the-same-port/" rel="nofollow ugc">http://braindrivendevelopment.com/2013/09/24/node-js-how-to-run-express-and-socket-io-on-the-same-port/</a></p>
<p>I&#8217;m trying to do something similar, but without breaking Sails standards.  If someone would like to enlighten me, please do.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hosting multiple Express (node.js) apps on port 80 &#124; Nerdpress.org &#124; oblong.io		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18796</link>

		<dc:creator><![CDATA[Hosting multiple Express (node.js) apps on port 80 &#124; Nerdpress.org &#124; oblong.io]]></dc:creator>
		<pubDate>Tue, 16 Jul 2013 23:16:57 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-18796</guid>

					<description><![CDATA[[...] via Hosting multiple Express (node.js) apps on port 80 &#124; Nerdpress.org. [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] via Hosting multiple Express (node.js) apps on port 80 | Nerdpress.org. [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pablo		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18676</link>

		<dc:creator><![CDATA[Pablo]]></dc:creator>
		<pubDate>Mon, 27 May 2013 07:04:09 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-18676</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18068&quot;&gt;Alex&lt;/a&gt;.

Haven&#039;t implemented yet, but I can see 3rd solution is a working proof-of-concept. You should be able to implement dynamic routing and config persistence on top of it, so you can modify route tables without restarting the server.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18068">Alex</a>.</p>
<p>Haven&#8217;t implemented yet, but I can see 3rd solution is a working proof-of-concept. You should be able to implement dynamic routing and config persistence on top of it, so you can modify route tables without restarting the server.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Max Girkens		</title>
		<link>https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18069</link>

		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Mon, 28 Jan 2013 15:10:01 +0000</pubDate>
		<guid isPermaLink="false">https://nerdpress.org/?p=2144#comment-18069</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18068&quot;&gt;Alex&lt;/a&gt;.

Thanks for your comment - the 3rd solution was the best i could come up with in terms of app-independence. Of course you&#039;ll have to restart the proxy -  and you have a point there as this affects all apps availability - but  the other apps can still keep running and keep sessions etc. 
Plus no other app is involved when one app crashes...
Would a quick restart of the server really affect users of running apps that much - i think sockets are capable of reconnecting in such case, aren&#039;t they?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://nerdpress.org/2012/04/20/hosting-multiple-express-node-js-apps-on-port-80/#comment-18068">Alex</a>.</p>
<p>Thanks for your comment &#8211; the 3rd solution was the best i could come up with in terms of app-independence. Of course you&#8217;ll have to restart the proxy &#8211;  and you have a point there as this affects all apps availability &#8211; but  the other apps can still keep running and keep sessions etc.<br />
Plus no other app is involved when one app crashes&#8230;<br />
Would a quick restart of the server really affect users of running apps that much &#8211; i think sockets are capable of reconnecting in such case, aren&#8217;t they?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
