Laravel Tutorial - Deploy any Laravel App in AWS

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 102

  • @GoFrendiGunawan
    @GoFrendiGunawan 3 роки тому +11

    Very detailed tutorial. Not only show us "success path", you also show "failure path" as well as how to overcome that

  • @emadzaamout
    @emadzaamout  3 роки тому +10

    0:08 Step 0 Create AWS Account
    0:27 Step 1 Domain Registeration - Route53
    1:36 Step 2 Elastic IP Address
    3:28 Step 3 Security Groups
    6:13 Step 4 Creating RDS Instance - MySQL Server
    10:06 Step 5 Creating EC2 Instance
    13:30 Step 6 Requirements Gathering & Exporting Local Laravel Project
    18:43 Step 7 Configuring Server & Importing Laravel
    30:32 Step 8 Configuring Apache2
    38:32 Step 9 Installing SSL Certificate (Enable HTTPS) Certbot
    40:39 Bonus - EC2 & RDS Monitoring Alerts - CloudWatch

  • @mohammadkanaan1576
    @mohammadkanaan1576 3 роки тому +3

    Thank you so much, Everything I need was here after spending hard effort for googling. The is the first time for me to deploying laravel APP on AWS.
    I didnt realise thats very simple like this. That is because your great knowledge and experience and the correct way to deliver the info.
    Thank you so much...

  • @dhavalprajapati8334
    @dhavalprajapati8334 2 роки тому +2

    This is the best video I came through to learn AWS, it helped me gain enough knowledge to manage AWS server. I am finally able to deploy my Laravel project on AWS. Thank you for helping 🙏🙏

  • @husenshareef9507
    @husenshareef9507 Рік тому

    This tutorial is completely A-Z as I expected. Love this tutorial

  • @hassanjamil841
    @hassanjamil841 Рік тому +3

    Love the tutorial, he explained each and every minor details we might need while configurations, I have got an whole idea after watching this 44 mins long video tutorial, very expressive and organized. Wish you best of luck AHT Cloud!

  • @vijaySangoi
    @vijaySangoi Рік тому

    thank you sir you made my day. i have been searching for ssl setup for days and really really annoyed as nothing was working but your step helped me set it up in just few minutes. god bless you

  • @clauvex7829
    @clauvex7829 2 роки тому +1

    This tutorial was very helpful for my job, even though I failed this configuration with an SQL Server, opting for a MySQL was still useful, thank you so much for this video, I learned a lot.

  • @reubenefe1266
    @reubenefe1266 Рік тому

    Best Laravel deployment tutorial i have seen so far. Made it easy for me. Thanks a lot

  • @FuzzPiAndFacial
    @FuzzPiAndFacial 2 роки тому

    Humble suggestion for those who are familiar it is an excellent practice to use S3 for static content.

  • @leverageguide5449
    @leverageguide5449 Рік тому

    Bestest in the world. Finally Found tutorial that helped me deploy my App after 2 days. Thank You Sir.

  • @Susmit-hv1it
    @Susmit-hv1it 2 місяці тому

    Thanks alot!! I was stuck at loading my site, and through your video i resolved it by installing libapache for my php version

  • @sunniawatyprayugo3578
    @sunniawatyprayugo3578 2 роки тому +1

    Very organized tutorial. I finally able to learn basic AWS with Ubuntu server for my sample project after several trial and errors due to different results. Great work AHT!

  • @mamunhossain3969
    @mamunhossain3969 8 місяців тому

    Great
    Best Laravel deployment tutorial ever I seen. Allah bless you dear. ❤

  • @kariminic
    @kariminic 3 роки тому +1

    Good job man. First time deploying a Laravel app to production on a different cloud provider other than AWS. This guide was more than enough with some complement from SO googling. You're a great instructor. Thanks :-)

    • @emadzaamout
      @emadzaamout  3 роки тому +2

      You just gave me the motivation to do more videos. If you want me to cover a topic please let me know. Thank you very much :)

    • @kariminic
      @kariminic 3 роки тому

      @@emadzaamout My pleasure. Been developing in Python but switching to PHP Laravel for a project. Will definitely be checking your channel for more content. Thanks again. Just earned a new sub :-)

  • @muhammadnasirkhan9120
    @muhammadnasirkhan9120 2 роки тому +2

    great man great job, very details & a very clean and easy way of explanation & implementation .. Great work AHT!

  • @chillingwithkids552
    @chillingwithkids552 2 роки тому

    one of the best tutorial I have ever seen

  • @reubenefe1266
    @reubenefe1266 Рік тому

    This is the best i have seen so far, very helpful. Thanks a lot

  • @emadzaamout
    @emadzaamout  3 роки тому +1

    Did you manage to deploy your site ? How did it go? Next step, automate your deployment such that once code is merged on master, all the deployment happens automatically. It's very easy trust me.
    DevOps Tutorial - Laravel Deployment Automation CI\CD using AWS RDS EC2 S3 CodeDeploy BitBucket
    ua-cam.com/video/YQsHMbbcIBo/v-deo.html

  • @datamatrix7
    @datamatrix7 9 місяців тому

    Great explanation: very detailed and clear. Thank you!

  • @fernandezjasper
    @fernandezjasper 2 місяці тому

    Year 2024 and still relevant ✅

  • @kellyburton
    @kellyburton 2 роки тому +1

    Awesome Tutorial - Explained it clearly and at a good pace.

  • @itwebadmin
    @itwebadmin 3 роки тому +1

    This was all I needed to get my blog deployed...

  • @shriram5494
    @shriram5494 2 роки тому

    This is the best tutorial I have seen. Great work AHT and thank you so much!

  • @hamdiiadh
    @hamdiiadh 3 роки тому +1

    Great job Emad. Keep up the good work!!!

  • @taslimsuman
    @taslimsuman 9 місяців тому

    Thanks a lot, very details tutorial. Never seen like that.

  • @tysonadeyemi3726
    @tysonadeyemi3726 3 роки тому +1

    I can't thank you enough. you saved me a lot of headaches. 5 star

  • @MarcelloPato
    @MarcelloPato 2 роки тому

    Congrats! Best video so far!

  • @TheFitCoiner
    @TheFitCoiner 2 роки тому +2

    Really nice class. Thank you so much

  • @whatworkedforthem6301
    @whatworkedforthem6301 3 роки тому +1

    Thanks a lot for your video. Really helped me in deployment. But I forgot to seed the RDS with the app local SQL database. Now I have two databases: Local and AWS RDS (MY SQL). Both of them have similar table structures.
    How can I merge the local SQL database with the existing AWS RDS without replacing/removing AWS RDS contents?

    • @emadzaamout
      @emadzaamout  3 роки тому +1

      Hello Virender. I am glad to hear that. Thank you. From what I understood, you have a local database and an AWS RDS database for your production. I am assuming there is no issues with running the migrations, and you only want to transfer your seed data. You can do 2 things.
      1) Create an export for your local database, and simply import it.
      2) Create a new laravel migration, with only the seed data.
      To export its really easy you run
      mysqldump -u [username] -p [database name] > [database name].sql
      to import you run
      CREATE DATABASE newdatabase;
      mysql -u [username] -p newdatabase < [database name].sql
      If you want struggle with writing these queries, you can download HeidiSQL MySQL Client and you can use the interface to export all your data and have that copied to your clipboard. Then you create a new migration that run your raw MySQL query (generated by HeidiSQL) to seed your data.
      If you struggle too much, let me know I can release a video on this by Wed

    • @whatworkedforthem6301
      @whatworkedforthem6301 3 роки тому

      @@emadzaamout Hey mate, really appreciate your efforts. It was impossible to to install it without your video. Yes, I seeded the database and it's working fine now. Will be bothering you again with more issues soon :)

  • @kristapsb-d3401
    @kristapsb-d3401 10 місяців тому

    Thanks man, this really helped me a lot!

  • @azharusni1942
    @azharusni1942 3 роки тому +1

    very intersting explanation on this channel.
    But i need your help. How to deploy lumen + vue cli on ubuntu server EC2 ?
    Please be kind to answer my question
    thank you so much

  • @MariaMelebari
    @MariaMelebari Рік тому

    Thank you so much, this video is very useful and complete
    The best video for this topic 💯

  • @kunalrajput4539
    @kunalrajput4539 2 роки тому +1

    Awesome video brother, keep up the good work

  • @tasnimcs5473
    @tasnimcs5473 Рік тому

    Thanks so much ! You really helped a lot

  • @gilpaloma8237
    @gilpaloma8237 2 роки тому

    Thank you for this very detailed tutorial. My server is working, however my sub URI is error 404 (Not Found). What did I miss?

  • @aflahvp7535
    @aflahvp7535 3 роки тому

    Great work bro, you even explained the error parts, Keep up the good work. ☼

  • @reggiefrias4383
    @reggiefrias4383 2 роки тому

    super detailed tutorial. super thanks man

  • @mixe4151
    @mixe4151 Рік тому

    Awesome vid helped alot!

  • @SalarPro
    @SalarPro Рік тому

    while(true) { print('THANK YOU') }

  • @mahmoudibrahem7216
    @mahmoudibrahem7216 2 роки тому

    Very detailed tutorial , thank you man

  • @johntyson3596
    @johntyson3596 3 роки тому +1

    Thank you very much very well explained

  • @ChungKang
    @ChungKang 2 роки тому

    excellent walkthrough, thank you!

  • @css_daily
    @css_daily 2 роки тому

    Thank you thank you thank you thank you thank you

  • @oshabasamson9126
    @oshabasamson9126 3 роки тому +1

    Awesome Tutorial

  • @JakeKang13
    @JakeKang13 Рік тому

    Thank you for amazing tutorial!~

  • @kunalrajput2234
    @kunalrajput2234 3 роки тому +1

    Great video thanks

  • @manishtechniz
    @manishtechniz Рік тому

    Thanks so much, It is awesome 😇

  • @medoune89
    @medoune89 2 роки тому

    Great tutorial

  • @paulkourouma1881
    @paulkourouma1881 2 роки тому

    Very Thank you guy. This video help me a lot
    Good explanation
    Five stars

  • @popforall
    @popforall Рік тому

    Thank you so much

  • @FuzzPiAndFacial
    @FuzzPiAndFacial 2 роки тому

    Sorry where is nginx and redis? Thanks a lot!

  • @mohammadkanaan1576
    @mohammadkanaan1576 3 роки тому

    Hi, Could you please tell me how much the anually cost of the SSL Certificate you installed.
    Thanks....

    • @emadzaamout
      @emadzaamout  3 роки тому +1

      hi mohammad. we are using certbot (let's encrypt) its free. No charges needed. You can use Certbot on both linux or windows servers. The only downside to it is that it expires more frequently (90 days). You can easily refresh it by running sudo certbot renew --dry-run. If you want to get fancy you add use cron to automatically run that every 90 days.

  • @RajarshiBanerjee1
    @RajarshiBanerjee1 2 роки тому

    I am getting this error while running migration " SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation (SQL: SET SESSION sql_require_primary_key=0)
    " - Any thoughts?

  • @ahmedhamza9277
    @ahmedhamza9277 2 роки тому

    you'r awesome ,friend ...... thanks :)

  • @aryangamingpro1
    @aryangamingpro1 2 роки тому

    Sir, what do i need to do if already deployed for the first time then i just want to update it as there is some changes in the file from github and i want the update on the website as well

  • @tysonadeyemi3726
    @tysonadeyemi3726 3 роки тому

    An interesting video would be how to implement CI/CD to EC2 using Code Pipeline etc

    • @emadzaamout
      @emadzaamout  3 роки тому +2

      Thanks man that's a great video idea. I will definitely make a video on that. Will most likely release it next Saturday:)

    • @tysonadeyemi3726
      @tysonadeyemi3726 3 роки тому +1

      @@emadzaamout That would be too awesome. Big props from Manchester, England!!

    • @tysonadeyemi3726
      @tysonadeyemi3726 3 роки тому

      @@emadzaamout Any news on this by chance?

    • @emadzaamout
      @emadzaamout  3 роки тому +1

      @@tysonadeyemi3726 hey man yes I got it done just few hours ago. Please wait till Tuesday. UA-cam takes a while to process 6k 1 hour videos on 60 fps. I'll let you know when live. Sorry tried my best to get it earlier but I wanted to do a full infrastructure covering every step.
      In the tutorial, we will be fully automating deployment. We are using Bitbucket Pipelines to automatically build, test and deploy changes to your production server. Also will be showing how to add staging. All the build scripts are done in bash. All this is triggered when code is commited on master branch. From the AWS side we're using AWS CodeDeploy + S3
      Finally, we will be using AWS Server Manager to store .env file and automatically load it.

    • @tysonadeyemi3726
      @tysonadeyemi3726 3 роки тому

      @@emadzaamout sounds so beautiful. Do you do consulting work by chance? Do you have experience with Laravel Sanctum?

  • @pimenvibritania8590
    @pimenvibritania8590 3 роки тому +1

    thank youuuuuuu !!

  • @rhnnf3502
    @rhnnf3502 3 роки тому

    do you need to install git first on your ec2 or it is already packaged on the ami ?

    • @emadzaamout
      @emadzaamout  3 роки тому

      It should be installed by default in Ubuntu 20. If not, you can easily install it by running
      sudo apt install git
      If you want to check if it's installed run
      git --version
      We are only using git to pull our project

    • @rhnnf3502
      @rhnnf3502 3 роки тому

      @@emadzaamout one more question, if i dont have any domain what do i need to write in the virtual host file ? thanks!

    • @emadzaamout
      @emadzaamout  3 роки тому

      @@rhnnf3502 just use your server ip address

  • @yasitharukshan556
    @yasitharukshan556 3 роки тому +1

    awesome

  • @spritelemon5406
    @spritelemon5406 Рік тому

    nice tut

  • @qasimsultani7991
    @qasimsultani7991 2 роки тому

    6:13 Step 4 Creating RDS Instance - MySQL Server database is configured but what if my website has any query login or gets any leads XYZ anything how the query show on tables?

  • @animetion349
    @animetion349 3 роки тому

    Does AWS provide any public domain , because I don't want to buy domain name first

    • @emadzaamout
      @emadzaamout  3 роки тому

      You can access your website (server) via your IP address. You don't need to buy a domain first.

  • @maxsteel350
    @maxsteel350 Рік тому

    hi ,thanks for your video after i followed all your steps it give me error 500 can you please help me

  • @kurumi-jd2ff
    @kurumi-jd2ff Рік тому

    Can I execute this on free tier account?

  • @mahmoudeldegwey6212
    @mahmoudeldegwey6212 2 роки тому

    when i try open ec2 ipv4 in browser it give me error ( An error occurred during a connection to MYIPV4 )

  • @tysonadeyemi3726
    @tysonadeyemi3726 3 роки тому

    I followed this instruction to a Tee, have you any idea why my app may not be setting the laravel_session / X-SRF cookie?
    It works absoltely fine on my localhost but on my ec2 instance it doesnt.

    • @emadzaamout
      @emadzaamout  3 роки тому

      Can you explain a little more ? What is the error your getting ? Are you using Laravel Passport ?

    • @tysonadeyemi3726
      @tysonadeyemi3726 3 роки тому

      @@emadzaamout I am not using passport.
      So basically when I do a POST i.e submitting a form I get the Error Code 419 which means session expired. I am using the file session driver and I can see the session files being geenrated in storage. Only difference is I can see in local when I go to the cookies in developer tools, there is a 'laravel_session' and 'X-RSF' cookie placed but on my server there isn't

    • @emadzaamout
      @emadzaamout  3 роки тому

      ​@@tysonadeyemi3726 That can be many things. Is this happening for your routes inside your web.php or api.php file?
      There is honestly lots of reasons why that could happen.
      1. Did you genereate your app key? check your .env for APP_KEY. Run php artisan key:generate and php artisan cache:clear
      2. Session expired error due to cache. Try cleaning cache. php artisan cache:clear.
      3. It could be a permission issue.
      chmod -R 755 storage
      chmod -R 755 vendor
      chmod -R 644 bootstrap/caches
      (If that didnt work, and you want to double check that its not a permission issue, try giving permission 777 temporarily chmod -R 777 storage
      4. VerifyCsrfToken.php:22 you have an array protected $except = [ "api/*" ]. This will basically ignore CSRF tokens for the api/* routes. Its not secure but sometimes you will need to ues it. For example some routes like webhooks don't use CSRF.
      5. For every form your adding @csrf correct?

    • @tysonadeyemi3726
      @tysonadeyemi3726 3 роки тому

      @@emadzaamout Finally fixed it thank you. Somehow deleting my repo and re instating it fixed it.
      You have no idea how much this guide helped me. Thanks so so so much.

  • @kamalCode
    @kamalCode 3 роки тому

    Sir, please laravel, node.js AWS complete advanced tuotorial plz. Plz speak easy English or Hindi

  • @FuzzPiAndFacial
    @FuzzPiAndFacial 2 роки тому

    Has anyone "dockerized" the laravel project push it to a container registry and deploy to kubernetes?

  • @thamneesparappil7110
    @thamneesparappil7110 3 роки тому +1

    i think you can use only one keyboard for one project😹😹😹

  • @ClassMust
    @ClassMust 11 місяців тому

    while i appreciate your efforts, there are a lot of missing steps in your tutorials. like updating the database cred in the .env file. you are probably ysing homestead so the changes will be reflected in the m branch>>>thanks

  • @kesselokinga9554
    @kesselokinga9554 3 роки тому

    @AHT Cloud, I have tried to follow what you advised me on:
    🌟 AHT Cloud replied: "You have to create a security group. Inbound rule SSH and for the value select my ip option. You need to give explicit IP access.
    "The same error prompted: ssh: connect to host 3.2789.38990.7230909 port 22: connection timed out".

  • @muhammadnasirkhan9120
    @muhammadnasirkhan9120 2 роки тому

    ubuntu@xxxxxx: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). i follow exactly what you did, i am using windows 10 to get login using SSH can you help me with what i am doing wrong?

  • @veelco
    @veelco 3 роки тому

    Can't seem to activate the certificate. Everything went well untill the command 'sudo certbot'. Redid step 2. again, nothing changed. Any help?
    Error given: DNS problem: SERVFAIL looking up A for my_domain_name.com
    - the domain's nameservers may be malfunctioning

    • @emadzaamout
      @emadzaamout  3 роки тому

      That means the domain is not pointing to the same IP Address as your server.
      Inside your route 53, check if you have 2 A records that point to your IP.
      Also, if this is a new domain make sure the DNS is propagated use whatsmydns.net
      When you get a new DNS or switch DNS for your domain it takes upto 48 hours to change. Use the website above to check if your domain resolves to the correct IP

    • @veelco
      @veelco 3 роки тому +1

      @@emadzaamout The 2 A records are pointing to my Elastic IP Created in EC2. It is a new domain and whatsmydns.net is giving me all red crosses. So I guess I'll have to wait 48 hours. Thanks, I'll let you know if this was it!

    • @veelco
      @veelco 3 роки тому

      Redid all steps with a new domain registration and it works like a charm. The first time I created the hostingzone (step 1) myself, but I noticed it will be created automatically. Thanks for the create tutorial!