Nginx, maraiadb, phpmyadmin을 바탕으로한다.
1. SSL
실습해보려면 여기서 해야하는 것 같음
How To Create a Self-Signed SSL Certificate for Nginx in Ubuntu 16.04 | DigitalOcean
TLS, or transport layer security, and its predecessor SSL, which stands for secure sockets layer, are web protocols used to wrap normal traffic in a protected, encrypted wrapper. Using this technology, servers can send traffic safely between the serve
www.digitalocean.com
ssl 적용시에
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
두 값이 1000 이하로 작아지면, too small로 ssl로 쓰일 수 없다고한다.
디버깅을 순차적으로 진행하지않고 dockerfile로 진행하다보니깐, 이러한 문제가 발생하였다.
2. redirection
port redirect : http -> https
www.psychz.net/client/question/ko/nginx-redirect-http-to-https.html
nginx에서 http를 https로 리디렉션합니다. ...
nginx에서 http를 https로 리디렉션합니다. Trusted By 10,000+ Customers (Since 2001)
www.psychz.net
url redirect
"좀 더 쉽게 말하자면 http://localhost/는 localhost라는 도메인을 찾으러 외부 DNS 서버로 나가는 것이 아니라 127.0.0.1이라는 IP 주소를 가리키고 있는 것이므로 곧 바로 자신의 컴퓨터를 찾아가는 것입니다."
url redirection은 dns에 다양한 도메인들을 신청해야하는 것 같다...
How nginx processes a request
http://nginx.org/en/docs/http/request_processing.html
How nginx processes a request
How nginx processes a request Name-based virtual servers nginx first decides which server should process the request. Let’s start with a simple configuration where all three virtual servers listen on port *:80: server { listen 80; server_name example.org
nginx.org
Server names
http://nginx.org/en/docs/http/server_names.html
Server names
Server names Server names are defined using the server_name directive and determine which server block is used for a given request. See also “How nginx processes a request”. They may be defined using exact names, wildcard names, or regular expressions:
nginx.org
3. autoindex
http://nginx.org/en/docs/http/ngx_http_autoindex_module.html
Module ngx_http_autoindex_module
Module ngx_http_autoindex_module The ngx_http_autoindex_module module processes requests ending with the slash character (‘/’) and produces a directory listing. Usually a request is passed to the ngx_http_autoindex_module module when the ngx_http_index
nginx.org
https://jootc.com/p/201902032656
Nginx 인덱스 페이지에 디렉토리와 파일 리스트 출력 - JooTC
Nginx 파일 리스트 출력 특정 디렉토리의 인덱스 파일을 현재 디렉토리 및 하위 디렉토리의 파일 리스트로 출력하고 싶을 때가 있습니다.일반적으로 Httpd 웹 서버를 사용할 때 인덱스 페이지를 디
jootc.com
index 파일은 폴더안에서 웹서버에서 README.md 같은 역활을 하는 것 같다.
폴더의 경로만 적어주어도 바로 index파일로 연결되게 되는데, 이 설정은 etc/nginx/sites-available/default 에서
index index.html index.htm index.php ... 에서 설정해주는 것으로 이해된다.
Enabling directory listing for a website using Nginx is pretty much simple, it takes 2 minutes and you will be able to see your directories and files from the web browser to explore them in the same way you would do with your local files browser.
웹페이지의 구성요소들을 파일처럼 관리하고 보기 원할 때!
https://nixcp.com/nginx-autoindex/
default configuration 파일에 대한 문법들
https://velog.io/@minholee_93/Nginx-Configuration-2-ask60bxdeh
[Nginx] Location Block & Variables
참고 자료 : https://www.udemy.com/course/nginx-fundamentals/ 이전글에 이어서 Nginx의 configuartion에 대해 알아보도록 하겠습니다. 3. Location Blocks > location은 specific uri에 대한 behavior를 정의하며 server 내부에 작�
velog.io
https://www.tuwlab.com/ece/26993
redirection return 301(permanent)와 return 302(temporary)의 차이
Nginx에서 자동 Redirection(301 Permanently moved) 설정하기 - ECE - TUWLAB
Nginx 설정파일의 server블록 안에 다음과 같은 구문을 추가하면 해당 가상 서버로 접속한 사용자를 지정한 주소로 자동 Redirection 시킬 수 있습니다. return 301 {Redirection 주소};여기서 301은 HTTP Status Co
www.tuwlab.com
site-enable에 있는 파일들은 site-available에 있는 파일들을 심볼릭 링크한 것이고, 실제로 nginx가 읽는 설정은 site-enable에 있는 설정들이다.https://twpower.github.io/50-make-nginx-virtual-servers
[Nginx] Nginx에서 가상서버 환경 설정하기
Practice makes perfect!
twpower.github.io
'42cursus > server' 카테고리의 다른 글
docker toolbox 설치에러 해결하기 (0) | 2020.08.27 |
---|---|
server_name (0) | 2020.08.06 |
ssl (0) | 2020.08.04 |
dockerfile (0) | 2020.07.30 |
서버 시행착오 (0) | 2020.07.30 |