Changes

From SME Server
Jump to navigationJump to search
9 bytes added ,  11:41, 29 January 2019
m
→‎Node Repo: formatting
Line 65: Line 65:  
  yum --enablerepo=epel update nodejs c-ares19 http-parser libuv v8
 
  yum --enablerepo=epel update nodejs c-ares19 http-parser libuv v8
 
* NodeJS updates are released every 3 - 12 weeks; check for updates regularly.
 
* NodeJS updates are released every 3 - 12 weeks; check for updates regularly.
<headertabs/>
+
<headertabs />
      Line 103: Line 103:  
== Port Redirect for each application==
 
== Port Redirect for each application==
 
Each application you build must run on a different port. Configure that way in app.js file.
 
Each application you build must run on a different port. Configure that way in app.js file.
 +
 
If you don't want to put that port each time but redirect an external URL (if the app is a website hosted on your SME server) you need to:
 
If you don't want to put that port each time but redirect an external URL (if the app is a website hosted on your SME server) you need to:
 +
 
a) create that external domain on SME web interface for domain as '''www.your.externaldomain.tld'''  
 
a) create that external domain on SME web interface for domain as '''www.your.externaldomain.tld'''  
    
b) create a new variable (NodePort) to specify that port  
 
b) create a new variable (NodePort) to specify that port  
  db domains setprop www.your.externadomain.tld NodePort 3003
+
  db domains setprop '''www.your.externadomain.tld''' NodePort 3003
 
  −
c) use a custom fragment template file [b]/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/27ProxyNodeJS[/b] with:
      +
c) use a custom fragment template file '''/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/27ProxyNodeJS''' with:
 
  {
 
  {
 
     use esmith::DomainsDB;
 
     use esmith::DomainsDB;
Line 126: Line 127:  
  }
 
  }
   −
Now just expand templates and restart
+
Now just expand templates and restart
 +
 
 
  expand-template /etc/httpd/conf/httpd.conf
 
  expand-template /etc/httpd/conf/httpd.conf
 
  /etc/init.d/httpd-e-smith restart
 
  /etc/init.d/httpd-e-smith restart
147

edits

Navigation menu