Followed almost every website, but didn't work. I followed your defined steps and its running. Thank you, Sir
@sergiyrudenko905 Жыл бұрын
Thank you, Enrico! Great lesson! Works great. If someone has something that doesn't work, you can always debug it with Nginx logs. In my case, I had "/build" folder permission issues. Fixed it by giving the right permission.
@mnyandeni Жыл бұрын
how did you give it the right permissions ?
@_Mandal_2 жыл бұрын
i am facing the same issue of loading welcome page
@User_jkjsbbk2 жыл бұрын
Subscribed, thank you a lot, I have finally fixed my problem with building, great tutorial
@dmontesa2 жыл бұрын
Thank you so much for this. I've tried so many tutorials but this was just so well explained and right for my app. Thank you again.
@thevolcanick2 жыл бұрын
subscribed! keep it up Enrico. helpful video.
@sgwong5132 жыл бұрын
really appreciate for this video. I been searching around for hours on web on how to serve react app but couldn't get it. (written the nginx try_files wrongly) really grateful about this video, it worked perfectly as I needed. Nice video with clear explanation.
@1995taunus Жыл бұрын
Thank you for the great lesson!
@user-ux1mz9ox6j Жыл бұрын
It shows the default nginx at the browser... kill me
@dancruz7845 Жыл бұрын
me too
@steelangelariana2 жыл бұрын
This is one of the best tutorial to learn how to deploy your app! Thank you so much for sharing this!!
@d0m22889 ай бұрын
Great tutorial, thank you.
@mohammadfalahi33692 жыл бұрын
Awesome and Helpful
@BP-qy2pb2 жыл бұрын
May I ask what's the difference between react + express + nginx vs react + nginx?
@EnricoPortolan2 жыл бұрын
Sure, in react + express + nginx express is acting as the web server, serve the React app and nginx is routing the traffic to express. In the other configuration, nginx is serving react as a static file so it’s acting as a “web server”
@njtuts58182 жыл бұрын
very good clarification
@agustinfeijoo14622 жыл бұрын
you are the best!
@ethangordon3935 Жыл бұрын
Is there a reason we don’t just point nginx to the build folder within our react application? Why make a new directory and copy?
@jasonhumphrey24642 жыл бұрын
Great Video!
@rankstrikers91872 жыл бұрын
I have followed your steps and configured. Page rendered but login api call is not working after npm run build. That means package.json proxy is working in react whole project but not work in build. Can you explain what the exact issue?
@CharlyBGood11 Жыл бұрын
I love you Friend! New suscriber here!! :D
@Mahesha999 Жыл бұрын
Hey super thanks for this crisp video. Also, have you created video explaining starting application from subpath which you said you will at the end of this video?
@EnricoPortolan Жыл бұрын
kzbin.info/www/bejne/bHTNk5iwmcd1btE Sure
@mihirdoshi12622 жыл бұрын
Thank you so much:)
@SanketPatil2 жыл бұрын
Thanks for video
@tylertyler96511 ай бұрын
is it necessary to do npm install if I copy my build file directly from my machine to ec2? That seems like the only reason we need npm run build from it. my ec2 keeps freezing when I run npm run build, maybe the memory is too small :(
@igorpostoev20775 ай бұрын
Same thing happening. Built locally
@Klausenitzer3 жыл бұрын
hey everything worked for me except the end result. I still just get the default Welcome to Nginx! Only thing I did differently was I did the create react app/create react routes last, would that have any affect? please let me know anything i can check
@EnricoPortolan3 жыл бұрын
Hey, did you run nginx reload to have your changes applied? if you have a Github repo I can have a look
@Klausenitzer3 жыл бұрын
@@EnricoPortolan I did run the reload, i've just gone through it again but no luck. I did notice i did input the wrong root path during the last step, so corrected that but same result D: Might give the github repo thing a go but never used it.
@EnricoPortolan3 жыл бұрын
@@Klausenitzer ok another thing you can do is to check the difference between my repo and your code: github.com/enricop89/react-app-expressjs-nginx
@Klausenitzer3 жыл бұрын
The problem isn't running the app though, it works fine locally like at the start of the video. It's just the end result when you are going to the IP of the server. Mine still just points to the Nginx default page. Seems like there is an additional step to point nginx to use the react.conf insted of the default file? I'm really not sure.
@tanphan28993 жыл бұрын
@@Klausenitzer I am also having the same problem as you
@Rory-qu4cx8 ай бұрын
Thanks! For anyone stuck on the Welcome Page - uncomment include /etc/nginx/sites-enabled/*, and anyone stuck on error 500 -> chmod +x each part of the path 'home/ubuntu/..../build'
@nidhityagi2076Ай бұрын
I am stuck on welcome page of nginx. /etc/nginx/sites-enabled/* already uncommented
@anonymoustv8604 Жыл бұрын
For me, There is no code inside my root div. The files are being loaded in my Network tab and even sources. My favicon is being displayed properly but no code inside my root div
@nagarajkalakutagi57172 жыл бұрын
Nice
@DuyTran-ss4lu2 жыл бұрын
Great
@smdjunaid10645 ай бұрын
i want to add different port for different project dirs......how plz explain this too
@mohitchandra2680 Жыл бұрын
what did you press to save the react.conf file i.e DOS Format, Mac Format, Append, Prepend, Backup files, to Files? Please tell we the command you used
@amarjeetsingh5473 Жыл бұрын
only working for home page but when clicking another link it is not working
@breaker__6 ай бұрын
Latest node version isn't working (20) - any recommendations for specific node version to use?
@SSSWorldClass Жыл бұрын
For every code changes in react js do we need to rebuild and restart nginx again and again.?
@asmaaat6266 Жыл бұрын
how can i deploy a reactjs project on the server if i have already the backend in the server
@bhargavitummala76902 жыл бұрын
Hi, npm run build was not working even after npm i
@yashtibrewal42592 жыл бұрын
thanks
@mdshadab34702 жыл бұрын
Bro I'm new to linux just come for server part how should i give the root directory no idea
@inhVanongFEFICHN Жыл бұрын
I have a question for you. I deploy on server Ubuntu and domain points to IP addresses. If i type ip address on browser, it is Ok but no routing when i type domain. Can you explain??
@EnricoPortolan Жыл бұрын
Have you added an A record on route 53 or on your DNS provider?
@felipperian67102 жыл бұрын
I did everything that you explain. But, my server dont shows the react application. The server is showing a starter page called "Welcome to nginx!". Can you help me?
@grandioso6668 Жыл бұрын
you fix?
@felipperian6710 Жыл бұрын
@@grandioso6668 no... Do you have the same problem?
@grandioso6668 Жыл бұрын
@@felipperian6710 yeah
@mathieugrosso93340 Жыл бұрын
hello ! i have followed the tutorial but when launching on ec2 instance i get "500 Internal Server Error" does any one know why ? Thanks !
@patrickrios997 ай бұрын
x2
@user-ux1mz9ox6j Жыл бұрын
Hey man, ec2, ubuntu 22.04 LTS require permission to approach the folder ( in video ubuntu).......... I spent time a lot man
@mnyandeni Жыл бұрын
how did you fix the permission issue ?
@Ben-pv9yh2 жыл бұрын
Why use an EC2? S3 with cloudFront is perfect for hosting static files. EC2 are so expensive
@EnricoPortolan2 жыл бұрын
I totally agree with you, in fact I made a video about it: kzbin.info/www/bejne/eYKbp62jZtCMoa8. Unfortunately some companies don't have the technology stack to deploy on S3 with Cloudfront and they prefer to use EC2 instances.
@srappytrex39462 жыл бұрын
Why do we run "npm run build" then " npm i" then "npm run build" again?
@EnricoPortolan2 жыл бұрын
Probably I said it by mistake, you need only npm install & npm run build
@srappytrex39462 жыл бұрын
@@EnricoPortolan Thank you, this is indeed a very clear walk through, appreciate it alot pal! Yet I am still crying all over my error 500 after a night of testing T.T...could it be something related to that the npm start won't run in port 80?
@balasubramaniam790410 ай бұрын
is this automatic deployment
@private61172 жыл бұрын
I have 500 internal error. Anyone could help
@ayeshazahid2421 Жыл бұрын
same here im keep on getting the same error
@jorgeramiroalarconvargas2580 Жыл бұрын
can you make your terminal smaller XD
@simranbanwait2 жыл бұрын
bro have font size for ants
@EnricoPortolan2 жыл бұрын
LOL
@edchelstephens2 жыл бұрын
Thank you Enrico. Do you have a video for deploying the same app with docker?
@EnricoPortolan2 жыл бұрын
Sure, check it out: kzbin.info/www/bejne/a52ukJx8f9iKrJY
@vladislav_pikiner Жыл бұрын
try_files $uri /index.html -- that`s what we neeeeeeeeed !!! ) TY SOOO MA
@22lordnik22 Жыл бұрын
Thanks! Redirecting the files to try_files $uri /index.html; fixed my Problem. Always got an 404-error.