Setup a Static Website Using Nginx

devops

Well-known member
  • Apr 3, 2023
    605
    463
    63
    colombo
    task list

    1. Buy a domain name from a domain Registrar
    2. Spin up a Ubuntu server.
    3. SSH into the server and install Nginx
    4. Download freely available HTML website files.
    5. Using SCP, copy the website files to the Nginx website directory.
    6. Validate the website using the server IP address.
    7. In your DNS account, create an A record and add the Elastic IP.
    8. Use the dig command to verify the DNS records.
    9. Using DNS verify the website setup.
    10. Create a Letsencryp certificate for the DNS and configure it on the Nginx server.
    11. Validate the website SSL using the OpenSSL utility.

    domain eka gatta, godaday lagen
    ------ Post added on Jan 14, 2024 at 4:22 AM

    ec2 instance ekak haduwa
    ------ Post added on Jan 14, 2024 at 4:27 AM
     

    Attachments

    • 1.jpg
      1.jpg
      48.1 KB · Views: 134
    • 22.jpg
      22.jpg
      115.5 KB · Views: 136
    • Like
    Reactions: Asmodeus

    devops

    Well-known member
  • Apr 3, 2023
    605
    463
    63
    colombo
    SSH into the server and install Nginx-done

    Access the Default Nginx Page:

    • Open a web browser and enter your EC2 instance's public IP address. You should see the default Nginx welcome page.
     

    Attachments

    • 23.jpg
      23.jpg
      84.7 KB · Views: 81

    Don GasCan

    Well-known member
  • Nov 3, 2010
    42,489
    48,717
    113
    සේදවත්ත
    පොර drvops පුරුදුවෙන කෙනෙක් වගේ මචං.

    උබෙන් හෙල්ප් එකක්‌ ඕනවෙයි කියල හිතල මෙන්සන් කරෙ. :)
    මම මේ හේනට යන ගමන් බන් ඉන්නේ . මොන ඩෙවොප්ස් ද 😁
     
    • Haha
    Reactions: NPC

    devops

    Well-known member
  • Apr 3, 2023
    605
    463
    63
    colombo
    im trying Using SCP, copy the website files to the Nginx website directory.
    but get error

    Last login: Sun Jan 14 01:07:01 2024 from 175.157.116.237

    [ec2-user@ip-172-31-44-133 ~]$ scp -i ~/.ssh/mytestserver.pem ~/Downloads/abc.html [email protected]:/usr/share/nginx/html/

    Warning: Identity file /home/ec2-user/.ssh/mytestserver.pem not accessible: No such file or directory.

    [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

    Connection closed
     

    Djice

    Well-known member
  • Jan 17, 2011
    4,408
    3,776
    113
    out of fucked up land
    im trying Using SCP, copy the website files to the Nginx website directory.
    but get error

    Last login: Sun Jan 14 01:07:01 2024 from 175.157.116.237

    [ec2-user@ip-172-31-44-133 ~]$ scp -i ~/.ssh/mytestserver.pem ~/Downloads/abc.html [email protected]:/usr/share/nginx/html/

    Warning: Identity file /home/ec2-user/.ssh/mytestserver.pem not accessible: No such file or directory.

    [email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

    Connection closed
    ithin oya hethuwa kiyala thiyenne
     

    devops

    Well-known member
  • Apr 3, 2023
    605
    463
    63
    colombo
    ithin oya hethuwa kiyala thiyenne

    Methana hira wela nine. Any help ☹️🙏
    ------ Post added on Jan 15, 2024 at 3:15 AM

    Using SCP, copy the website files to the Nginx website directory.

    I'm stuck in here

    scp -i ~/.ssh/newkey.pem ~/Downloads/abc.html [email protected]:/usr/share/nginx/html/
    ------ Post added on Jan 15, 2024 at 3:22 AM
     

    Attachments

    • Screenshot_1.png
      Screenshot_1.png
      12.5 KB · Views: 94
    • Screenshot_2.png
      Screenshot_2.png
      65.4 KB · Views: 69
    • Screenshot_3.png
      Screenshot_3.png
      61.4 KB · Views: 79
    • Screenshot_4.png
      Screenshot_4.png
      87.9 KB · Views: 70
    Last edited:

    devops

    Well-known member
  • Apr 3, 2023
    605
    463
    63
    colombo
    nama devops unata wada nam devops neme. anika devops kiyanne concept/ideology ekak. okkotama wada man dapu command kale mokadda, ehema kale ai kiyala hoyala balapan
    Command kale... Mulinma html file eka ec2 instance eke home directry ekata copy kala. Next ec2 ekata log una. Next ec2 eke home directry ekata kalin copy karapu html eka nginx eke html folder ekata damma.

    Hetuwa nm danne na ai ehema kale kiyla 😶