LightSail로 웹 서버 만들기

8430 단어 LightsailAWS

개시하다


비망각으로 투고하다.

인스턴스 생성하기

  • 화면 이동 Lightsail의 메인 화면 > [실례] 탭 > [실례의 창설]
  • 도쿄 로케이션 A구(ap-northeast-1a)
  • 플랫폼 Linux/Unix
  • 설계도 WordPress

  • (옵션) 시작 스크립트를 만들지 않음
  • (선택 사항) SSH 키 쌍의 변경 [SSH 키 쌍의 변경]을 클릭하여 기본 키를 다운로드합니다.
  • (선택 사항) 웹 서버에서 만든 후 스냅샷의 유효성을 설정하여 유효하지 않습니다.
  • 실례 계획의 선택은 잠시 가장 싸다.필요하면 언젠가는 확대될 거야.

  • 인스턴스 이름
  • 키의 탭이 하나밖에 없기 때문에 탭을 만들지 않습니다.

  • 클릭 실례 창설
  • 정적 IP 주소 만들기

  • 화면 마이그레이션
    Lightsail의 홈페이지 화면 > [네트워크] 탭 > [정적 IP 제작]
  • 인스턴스에 대한 첨부 인스턴스를 선택합니다.
  • 정적 IP의 리소스 이름 기본값
  • [생성]
  • 클릭

    독립 도메인 이름 가져오기


    FC 2는 비교적 저렴한 것 같지만 이미 다른 도메인 이름이 있습니다.com에서 취득했기 때문에 이름.네트워크에서 가져오기

    DNS 영역 만들기

  • 화면 이동 Lightsail의 홈페이지 화면 &[네트워크] 라벨&[DNS 구역 제작]
  • 등록된 영역의 입력이 가져온 독립된 영역을 입력합니다.

  • (옵션) 태그가 생성되지 않았습니다.
  • [DNS 영역 만들기]

  • DNS 레코드 추가

  • 화면 마이그레이션
    Lightsail의 홈 화면 > [네트워크] 탭 > 제작된 DNS 영역 선택
  • @ 을 입력하여 도메인을 하위 도메인 없이 IP 주소로 설정합니다.해결점에서 제작된 정적 IP를 선택하십시오.오른쪽 상단의 검사 버튼을 누르세요.
  • 이름 서버(옐로우 네트워킹)를 확인한 후 저장합니다.
  • 공급자 측에서 이름 서버를 설정합니다


    공급업체의 콘솔을 사용하여 방금 저장한 이름 서버를 설정합니다.
    성함이 어떻게 되십니까?com에 로그인
  • 명칭 서버 설정 클릭
  • 독립 도메인 확인
  • 방금 저장한 이름 서버 입력
  • 클릭[확인]
  • 몇 분 후 액세스 성공!


  • yoshiki@mbp ~ % nslookup xxxxxxxxxxxxxx.com
    
    Non-authoritative answer:
    Name:   xxxxxxxxxxxxxxx.com
    Address: xxx.xxx.xxx.xxx
    

    HTTPS화


    Bitnami는 bncert-tool이라는 독특한 HTTPS 설정 도구를 제공합니다.
    이 도구는 다음 프로그램을 자동으로 실행합니다.
    · 비트나미 스택을 통한 HTTPS 인증서 설정
    • 인증서 작성 자동 업데이트
    • HTTP에서 HTTPS로의 리디렉션 설정
    AWS 공식 Howdo I installa standard Let's Enncrypt SSL certificate in a Lightsail instance?

    1. SSH를 통한 인스턴스 로그인



    2. Bitnami 도구 설치


    문서 사이트
    wget -O bncert-linux-x64.run https://downloads.bitnami.com/files/bncert/latest/bncert-linux-x64.run
    sudo mkdir /opt/bitnami/bncert
    sudo mv bncert-linux-x64.run /opt/bitnami/bncert/
    sudo chmod +x /opt/bitnami/bncert/bncert-linux-x64.run
    sudo ln -s /opt/bitnami/bncert/bncert-linux-x64.run /opt/bitnami/bncert-tool
    

    3. BitnamiHTTPS 구성 도구 실행

    sudo /opt/bitnami/bncert-tool
    

    4. 비트나미와의 대화에 대답


    명령을 입력해야 하는 곳에 별을 붙이다.
    bitnami@ip-xxx-xxx-xxx-xxx:~$ sudo /opt/bitnami/bncert-tool
    ★An updated version is available. Would you like to download it? You would need to run it manually later. [Y/n]: y
    
    The tool will exit now. To run the updated version run the following command: 
    /opt/bitnami/bncert-tool 
    bitnami@ip-xxx-xxx-xxx-xxx:~$ sudo /opt/bitnami/bncert-tool
    ----------------------------------------------------------------------------
    Welcome to the Bitnami HTTPS Configuration tool.
    ----------------------------------------------------------------------------
    Domains
    Please provide a valid space-separated list of domains for which you wish to 
    configure your web server.
    ★Domain list []: (独自ドメイン)                        
    ★The following domains were not included: www.(独自ドメイン). Do you want to add them? [Y/n]: n
    
    Warning: No www domains (e.g. www.example.com) or non-www domains (e.g. 
    www.example.com) have been provided, so the following redirections will be 
    disabled: non-www to www, www to non-www.
    ★Press [Enter] to continue:
    ----------------------------------------------------------------------------
    Enable/disable redirections
    Please select the redirections you wish to enable or disable on your Bitnami 
    installation.
    ★Enable HTTP to HTTPS redirection [Y/n]: 
    
    ----------------------------------------------------------------------------
    Changes to perform
    The following changes will be performed to your Bitnami installation:
    1. Stop web server
    2. Configure web server to use a free Let's Encrypt certificate for the domains: 
    (独自ドメイン)
    3. Configure a cron job to automatically renew the certificate each month
    4. Configure web server name to: (独自ドメイン)
    5. Enable HTTP to HTTPS redirection (example: redirect http://(独自ドメイン) 
    to https://(独自ドメイン))
    6. Start web server once all changes have been performed
    
    ★Do you agree to these changes? [Y/n]: 
    
    
    ----------------------------------------------------------------------------
    Create a free HTTPS certificate with Let's Encrypt
    Please provide a valid e-mail address for which to associate your Let's Encrypt 
    certificate.
    Domain list: (独自ドメイン)
    Server name: (独自ドメイン)
    ★E-mail address []:(メールアドレス)
    
    The Let's Encrypt Subscriber Agreement can be found at:
    https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
    ★Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: y
    ----------------------------------------------------------------------------
    Performing changes to your installation
    The Bitnami HTTPS Configuration Tool will perform any necessary actions to your 
    Bitnami installation. This may take some time, please be patient.
    ----------------------------------------------------------------------------
    Success
    

    5. HTTPS화 확인


    웹 페이지를 실제로 방문하여 URL 표시줄에 난징 자물쇠 표지가 표시되었는지 확인하세요.

    참조 링크


    Amazon Lightsail을 통한 웹 사이트 구축(LAMP 환경)

    좋은 웹페이지 즐겨찾기