전체 글
-
[Apache] Ubuntu Apache SSL 적용LINUX/SSL 2020. 4. 22. 17:33
이번 포스팅은 Apache에 SSL 인증서를 적용하려고 한다. 먼저 공유기 443 외부, 내부 포트를 연다. root 계정으로 openssl을 다운로드 한다. /etc/apache2에서 ssl 폴더를 생성 후 ssl 폴더로 이동한다. CA 인증서를 생성 후 사용할 비밀번호를 2번 입력한다. 명렁어 입력 후 비밀번호를 입력을 하고 모두 엔터를 누르고 CSR을 생성한다. 편의를 위해 개인키 암호를 제거한다. CRT 인증서를 생성한다. 인증서 인코딩 포맷을 변경한다. 그 다음 인증서를 활성화 시킨 후 443 포트 방화벽을 연다. 파일과 폴더의 권한을 변경 후 443 포트가 실행됬는지 확인한다. https://아파치 내부 IP 로 접속했을 때 아래 같은 화면이 출력되면 성공이다. $ sudo su - # apt..
-
[Apache] Apache Web Server 도메인 설정LINUX/Apache 2020. 4. 22. 17:09
이번 포스팅은 아파치 웹 서버(우분투 1)를 이용하여 다른 was 서버(우분투 2)를 호출하려고 한다. 먼저 도메인이 필요하다. 필자는 https://www.hosting.kr/에서 도메인을 샀다. hosting 설정은 됬다는 가정하에 진행한다. 먼저 공유기 포트포워딩 설정을 한다. ip는 아파치 웹 서버 내부 ip를 입력한다. 포트번호는 외부 내부 둘다 80으로 설정한다. root 계정으로 apache2를 다운로드 후 해당 경로에 logs 폴더를 생성한다. 그 다음 sites-available 폴더로 이동한다. $ sudo su - # apt-get install -y apache2 # cd /etc/apache2 # mkdir logs # cd sites-available 다음 명렁어를 입력 후 00..
-
[OpenVPN] 4. Ubuntu OpenVPN Client 설치LINUX/OpenVPN 2020. 4. 22. 16:21
오랜만에 포스팅을 작성한다. 오늘은 OpenVPN 서버 있는 우분투가 아닌 다른 우분투 OpenVPN 클라이언트를 설치하려고 한다. 우분투 버전은 18.04.4 버전이다. 간단하니 따라해보자. 먼저 전 포스팅에서 openvpn 인증서를 발급하는 것을 따라하자. ca.crt apache.crt apache.key apache.ovpn 인증서 파일이 필요하다. apache 는 인증서명이니 사용자에 따라 달라질 수 있다. 2019/10/20 - [LINUX/OpenVPN] - [OpenVPN] 2. Windows OpenVPN Client 설치 [OpenVPN] 2. Windows OpenVPN Client 설치 전 포스팅에서는 우분투에 OpenVPN 서버를 설치하였다. 이제 OpenVPN Client를 설치..
-
[ANDROID] RETROFIT2 파일 + 텍스트 전송ANDROID 2020. 1. 17. 11:12
서버 Controller @RequestMapping(value="/app/uploadFile.do", method = {RequestMethod.GET, RequestMethod.POST}) public @ResponseBody Object uploadFile(MultipartHttpServletRequest request) throws Exception{ ModelAndView mv = new ModelAndView("jsonView"); System.out.println("test===" + request.getParameter("test")); return mv; } 앱 RetrofitService.java import java.util.LinkedHashMap; import java.util.L..
-
[ANDROID] 이전 Activity 로 데이터 전송하기ANDROID 2020. 1. 8. 10:12
activity_main.xml MainActivity.java package com.example.sampleintent; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends AppCompatActivity { public static final int REQUEST_CODE_MENU = 10..
-
[ANDROID] 동적 layout 추가 삭제(LayoutInflater)ANDROID 2020. 1. 7. 17:26
LayoutInflater을 이용하여 동적 layout 추가, 삭제를 한다. activity_menu.xml sub1.xml MenuActivity.java package com.example.samplelayoutinflater; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.LinearLayout; p..
-
[ANDROID] MainActivity.java 에서 다른 xml ID 호출(LayoutInflater)ANDROID 2020. 1. 7. 14:44
LayoutInflater를 이용하여 다른 xml를 제어할 수 있다. package com.example.sampletoast; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onC..