1. Forums
  2. General
  3. Programming for CloudLinux
  1. ajay ajay
  2. Wednesday, 27 February 2019
  3.  Subscribe via email
please confirm which nodejd/public folder do i have to create htaccess file and which one is correct from following

mynode js app

-- http://domain.com/trip = trip is my node js app
-- where to create htaccess file
http://domain.com/trip/public/<.htaccess>?

+++++++++++++

RewriteEngine On
RewriteRule ^$ http://127.0.0.1:3000/ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:3000/$1 [P,L]

++++++++++++++++++
RewriteEngine On
RewriteRule ^$ http://myprofile.work:30000 [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://myprofile.work:30000$1 [P,L]

++++++++++++++++++
PassengerBaseURI /trip
PassengerAppRoot /home/profile/passenger_node_trip

PassengerAppType node
PassengerStartupFile server.js
Rate this post:
  1. 05.03.2019 15:03:02
  2. # 1
Posts: 64
Joined: 17.08.2016
0
Votes
Undo
Hello,

The .htaccess file should be created automatically when you create an application from your panel, using Node.JS Selector: https://docs.cloudlinux.com/node_js_selector.html

If something is not working correctly, feel free to submit a ticket at cloudlinux.zendesk.com, so we could take a closer look.
  1. 07.12.2019 06:12:09
  2. # 2
Emrys Lott Accepted Answer
Posts: 1
Joined: 07.12.2019
0
Votes
Undo
Hello,

The .htaccess file should be created automatically when you create an application from your panel, using Node.JS Selector: https://docs.cloudlinux.com/run 3node_js_selector.html

If something is not working correctly, feel free to submit a ticket at cloudlinux.zendesk.com, so we could take a closer look.


Thank you so much! It's very helpful!
  1. 09.12.2019 10:12:30
  2. # 3
Sergey Khristich Accepted Answer
Posts: 397
Joined: 20.05.2019
0
Votes
Undo
Hello Emrys,
Happy to hear it and thanks for following up!
Marketing Manager
  1. 16.02.2020 05:02:04
  2. # 4
Clara Accepted Answer
Posts: 0
Joined: 05.08.2020
0
Votes
Undo
It helping me too :) . Thank you for this great work Kateryna
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.