Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Nginx reverse proxy for NodeJs Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
chrisf
Posts: 49
Joined: Sat Oct 13, 2018 6:25 pm

Os: Ubuntu 16x
Web: apache + nginx
Nginx reverse proxy for NodeJs
  • Quote

Post by chrisf » Sun Oct 14, 2018 12:35 am

Greetings! I was a long term user of KloxoMR, but have moved to a Ubuntu box. Vesta is very very clean. I am amazed! :-)

I have 8 domains, all running well. One of the domains must reverse proxy nodejs - not Apache. I am looking for a solution that will not get wiped or removed if I need to rebuild the web.

location / {
proxy_pass http://private_ip_address:9090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}

If I change the domain file in nginx to the above, will changes persist?

Thank you and thank you for a great panel!

Chris
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Nginx reverse proxy for NodeJs
  • Quote

Post by mehargags » Mon Oct 15, 2018 10:14 am

just create a template with name 'nodeJSrevproxy' with your config and place it here

Code: Select all

/usr/local/vesta/data/templates/web/nginx
You can make a copy of one of the existing templates and reuse its variables, will be easier.

Once template is made, restart vesta and choose Nginx template from WebUI for the domain.
Top

chrisf
Posts: 49
Joined: Sat Oct 13, 2018 6:25 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Nginx reverse proxy for NodeJs
  • Quote

Post by chrisf » Mon Oct 15, 2018 8:36 pm

That is great! Thank you very much.

I have a lot to learn about Vesta, the template system is nice.

[Edit]
I thought by seecting solved it would just mark the topic, but it marked my post. The post above is the answer :-)
Top

chrisf
Posts: 49
Joined: Sat Oct 13, 2018 6:25 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Nginx reverse proxy for NodeJs
  • Quote

Post by chrisf » Tue Oct 16, 2018 12:47 am

Worked perfectly. Easy to undertand, stpl for ssl ,tpl normal... nice :-)

Thank you again!
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password