Is there any way to connect a direct Node.js project to a domain?

Asked

Viewed 176 times

0

Good my problem is because I have an open site at door 80 and a project made in open Node at door 8080. I own the domain:https://erkonow.com, when trying to access it only directs all subdomains to my site (making my application run out of domain), is there any way I can make the application point to a subdomain? In the case: https://coup.erkonow.com, I use Xampp. Someone can explain or give me some guidance?

Another possible output would be a way to run *.php in this app of mine, because then I could fit the page I want to the app.

  • Dude, change the Node port by express (or whatever web server you’re using with Node), that’s it. Put port 3000.

1 answer

1


There’s no problem using door 8080 for that. Although possible, you don’t need Xampp to provide a Node application, it itself creates an http server and listens at the defined port.

First of all, your application must be accessible by port 8080, IE, the port has to be open on your server and the application running on it. After that, you need to access your domain provider and look there for how to create a subdomain pointing to your server IP along with port 8080 (eg 127.168.0.1:8080). Each provider will do it in a different way, and some do not even allow it to be done through the interface, so you would have to send an email to them. You will probably have to set up CNAME for this.

maybe it’ll help: https://www.cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.