![]() If you access the at, you will see the server up and running! Easy right? Then don’t forget to check the status of your server with: Next, restart the server with this command: The ProxyPass methods above basically route the server to serve the specified location, in this case localhost:3000, at the root of the static IP address. These are common vim commands, but if you’re new, you usually have no idea how to write or exit this. Basically that writes the new changes to the document and then quits the editor. To do this, press “I” to insert, then use the arrow keys to got to the write location and type. Just add this where the blue arrow points, under VirtualHost Yes, it’s similar to the movie Inception.ĭon’t be intimidated, it’s quite easy. I should note, 2 of these hours were trying to set a port forward with s3 buckets, but we will ignore that ‘hack’.Īpache is the server that you are using to serve your app. ![]() 5 head splitting hours of reading documentation on bitnami, apache, and so many stackoverflow posts about almost similar problems that I could almost use. Ok ok, it might not seam so crazy, but this next part took me 5 hours to figure out. Step 3 Setting up a Proxy on Apache (The not so “simple”, “simple” solution) Thankfully, there is a “simple” solution. But you will notice that in order to access the site, you have to visit:ĭo you want to make a note to your client that people have to type in the port every time they visit the site? But what if you connect the the server to a domain name, say, “Connecting a Lightsail instance with Route 53 is easy thankfully, just use the static IP for the A name address. Now this is great! App is up and running, everything looks good. If you want to terminate the servers, run: If you want to check the status, simply run: Pm2 start server.js (< - your server file)Įasy! Done! pm2 is an awesome tool that will handle restarts for you as well. Pm2 is an npm install that allows you to continue running the server even after the close the SSH session. Once set up, you visit the static IP at the exposed port to visit your site! One issue though, if you close the SSH connection, you will notice that it doesn’t work, because you closed the session running the server.ĭon’t worry, we have a solution for that. Simply click on the Networks tab, and add your port to the firewall. You need to set up a static IP address, and add the port to your firewall. You can even add the port :3000 at the end, and for some reason, no dice. You can visit your site through the IP address assigned, but it won’t work. Now congrats!!! You can visit your site!!! You may notice a few issues at this point. Great! You can simply run your server with whatever start command you use! Then simply go to the directly and install any dependencies. If you don’t have your code on github or any version control site, you need to get on that. The basic step is to SSH into the server, and then simply clone your repo from github. I would ignore the port about switching the port from 80 to 8080 in the nf file. If you’re like most devs, you already have the site running locally, with a database connected. This AWS mastermind has a great guide to getting it set up.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |