nodejs app htaccess

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cloudlinux
    Junior Member
    Forum Explorer
    • Mar 2021
    • 11

    #1

    nodejs app htaccess

    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
    https://](http://domain.com/trip)[ht...om/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](http://domain.com/trip/public)
  • kobiidykhata
    Member
    • Apr 2017
    • 94

    #2
    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.

    Comment

    • velvetcanyion
      Junior Member
      • Mar 2021
      • 1

      #3
      > 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.](https://docs.cloudlinux.com)

      Thank you so much! Its very helpful!

      Comment

      • skhristich
        Senior Member
        • Nov 2019
        • 595

        #4
        Hello Emrys,
        Happy to hear it and thanks for following up!

        Comment

        • skhristich
          Senior Member
          • Nov 2019
          • 595

          #5
          It helping me too . Thank you for this great work Kateryna

          Comment

          • john5697smi
            Junior Member
            • Oct 2021
            • 1

            #6
            Hello,

            Thanks

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

            Comment

            Working...