Hi
I think port 80 that means you need to run as root.
Why not just run on default 127.0.0.1:3000 and then install nginx as a
reverse proxy? Put this
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_pass http://127.0.0.1:3000;
proxy_redirect off;
}
into /etc/nginx/sites-enabled/default and restart nginx
Regards
On Sat, Sep 27, 2014 at 5:03 PM, Adam Reynolds <[email protected]>
wrote:
> Is consider using iptables to forward port 80 traffic to your node
> instance.
> On 27 Sep 2014 20:48, "Craig Coleman" <[email protected]> wrote:
>
>> I'd like to try running nodejs on port 80 on a debian and gentoo server
>> I've seen a lot post how people do this but I'd like to get some
>> additional advice so I don't screw things up on our test servers.
>> I'm just getting started with node.
>> I have installed hapi
>> Thanks, cwc
>>
>> var Hapi = require('hapi');
>> var server = new Hapi.Server(80);
>>
>> server.route({
>> method: 'GET',
>> path: '/',
>> handler: function (request, reply) {
>> reply('Hello, world!');
>> }
>> });
>>
>> server.route({
>> method: 'GET',
>> path: '/{name}',
>> handler: function (request, reply) {
>> reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
>> }
>> });
>>
>> server.start(function () {
>> console.log('Server running at:', server.info.uri);
>> });
>>
>>
>> --
>> Job board: http://jobs.nodejs.org/
>> New group rules:
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/nodejs/feeda1ed-67bd-4259-8f9e-cf42e68e7876%40googlegroups.com
>> <https://groups.google.com/d/msgid/nodejs/feeda1ed-67bd-4259-8f9e-cf42e68e7876%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/CAFszCkOf8vg9-W6MH-Jiu1AZ5Z9T_kq9J_6tLDtWNqrVkEwuqA%40mail.gmail.com
> <https://groups.google.com/d/msgid/nodejs/CAFszCkOf8vg9-W6MH-Jiu1AZ5Z9T_kq9J_6tLDtWNqrVkEwuqA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Ian Lawrence
Tel: (+55 48) 84933198
E-mail: [email protected]
Web: http://ianlawrence.info
Code: https://github.com/IanLawrence
Author, Professional Ubuntu Mobile Development (Wiley 2009)
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/CAPadBSYpNiT%3DEo8nAoTLXnykXd9e5RAV8zFRJnLVqyaJWxZfUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.