[Nginx] Full Example Configuration

 

1. nginx.conf

user       www www; ## Default: nobody
worker_processes  5;  ## Default: 1
error_log  logs/error.log;
pid        logs/nginx.pid;
worker_rlimit_nofile 8192;

events {
  worker_connections  4096;  ## Default: 1024
}

http {
  include    conf/mime.types;
  include    /etc/nginx/proxy.conf;
  include    /etc/nginx/fastcgi.conf;
  index    index.html index.htm index.php;

  default_type application/octet-stream;
  log_format   main '$remote_addr - $remote_user [$time_local]  $status '
    '"$request" $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';
  access_log   logs/access.log  main;
  sendfile     on;
  tcp_nopush   on;
  server_names_hash_bucket_size 128; # this seems to be required for some vhosts

  server { # php/fastcgi
    listen       80;
    server_name  domain1.com www.domain1.com;
    access_log   logs/domain1.access.log  main;
    root         html;

    location ~ \.php$ {
      fastcgi_pass   127.0.0.1:1025;
    }
  }

  server { # simple reverse-proxy
    listen       80;
    server_name  domain2.com www.domain2.com;
    access_log   logs/domain2.access.log  main;

    # serve static files
    location ~ ^/(images|javascript|js|css|flash|media|static)/  {
      root    /var/www/virtual/big.server.com/htdocs;
      expires 30d;
    }

    # pass requests for dynamic content to rails/turbogears/zope, et al
    location / {
      proxy_pass      http://127.0.0.1:8080;
    }
  }

  upstream big_server_com {
    server 127.0.0.3:8000 weight=5;
    server 127.0.0.3:8001 weight=5;
    server 192.168.0.1:8000;
    server 192.168.0.1:8001;
  }

  server { # simple load balancing
    listen          80;
    server_name     big.server.com;
    access_log      logs/big.server.access.log main;

    location / {
      proxy_pass      http://big_server_com;
    }
  }
}

 

2. proxy.conf

proxy_redirect          off;
proxy_set_header        Host            $host;
proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size    10m;
client_body_buffer_size 128k;
proxy_connect_timeout   90;
proxy_send_timeout      90;
proxy_read_timeout      90;
proxy_buffers           32 4k;

 

3. fastcgi.conf

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

fastcgi_index  index.php;

fastcgi_param  REDIRECT_STATUS    200;

 

4. mime.types

types {
  text/html                             html htm shtml;
  text/css                              css;
  text/xml                              xml rss;
  image/gif                             gif;
  image/jpeg                            jpeg jpg;
  application/x-javascript              js;
  text/plain                            txt;
  text/x-component                      htc;
  text/mathml                           mml;
  image/png                             png;
  image/x-icon                          ico;
  image/x-jng                           jng;
  image/vnd.wap.wbmp                    wbmp;
  application/java-archive              jar war ear;
  application/mac-binhex40              hqx;
  application/pdf                       pdf;
  application/x-cocoa                   cco;
  application/x-java-archive-diff       jardiff;
  application/x-java-jnlp-file          jnlp;
  application/x-makeself                run;
  application/x-perl                    pl pm;
  application/x-pilot                   prc pdb;
  application/x-rar-compressed          rar;
  application/x-redhat-package-manager  rpm;
  application/x-sea                     sea;
  application/x-shockwave-flash         swf;
  application/x-stuffit                 sit;
  application/x-tcl                     tcl tk;
  application/x-x509-ca-cert            der pem crt;
  application/x-xpinstall               xpi;
  application/zip                       zip;
  application/octet-stream              deb;
  application/octet-stream              bin exe dll;
  application/octet-stream              dmg;
  application/octet-stream              eot;
  application/octet-stream              iso img;
  application/octet-stream              msi msp msm;
  audio/mpeg                            mp3;
  audio/x-realaudio                     ra;
  video/mpeg                            mpeg mpg;
  video/quicktime                       mov;
  video/x-flv                           flv;
  video/x-msvideo                       avi;
  video/x-ms-wmv                        wmv;
  video/x-ms-asf                        asx asf;
  video/x-mng                           mng;
}




References

[1] Nginx. (?). Full Example Configuration [Web Document]

 


Hashtags

#nginx #nginx reference #nginx config #nginx configuration #nginx.conf

'Others > Quick References' 카테고리의 다른 글

[Linux] Common Commands  (0) 2020.02.26
[Markdown] Cheat Sheet  (0) 2020.02.24

WRITTEN BY
아키텍토필
소프트웨어 아키텍트의 스터디 룸

,

유튜브 노래 mp3 파일로 다운로드하는 법(무료)


1. 서론

요즘에는 유튜브로 노래를 정말 많이 듣는다. 가수들의 신곡이 나오면 대부분 유튜브에서 무료로 들을 수 있다.
하지만 굳이 영상을 보는 것이 아니라 길을 걷거나 지하철에 앉아 있을 때 노래만 듣고 싶다면 멜론이나 애플뮤직, 벅스, 지니와 같은 어플을 이용해 스트리밍을 통해 음악을 듣곤 한다. 하지만 문제는 내가 듣고 싶은 음악이 스트리밍 어플에 없는 경우가 있다는 것이다. 국내 어플에는 해외 음악들이 부족하고, 반대로 애플 뮤직과 같은 해외 어플에는 국내 음악이 부족한 경우가 많다. 물론 유튜브 뮤직 어플을 이용하면 쉽게 노래를 찾아 들을 수 있지만 문제는 돈을 내고 프리미엄에에 가입하지 않으면 음악 듣는 중간에 광고가 뜨고 더욱 큰 문제는 백그라운드 재생이 안 된다는 것이다. 게다가 멜론 같은 어플들은 통신사 요금과 결합하면 스트리밍 서비스에 대해서는 데이터가 소진되지 않는 혜택이 있지만 유튜브 뮤직을 사용하면 노래를 들을 때마다 계속해서 데이터가 소진되는 단점이 있다.

그리고 또 하나의 문제는 스트리밍을 이용할 수 없을 경우이다. 데이터가 모두 소진되었거나 또는 비행기 안에 타고 있거나 해외여행을 하는 중일 때는 인터넷에 연결되지 않아서 오프라인으로 노래를 들어야 하는 경우가 발생한다.
이럴 때는 원하는 노래를 모바일에 저장하여 들어야 하는데 내가 즐겨듣는 노래가 음악 어플에 없다면 다운받을 수가 없다. 또한 인터넷이 연결되지 않았기 때문에 유튜브를 통해서 음악을 들을 수도 없다.

이럴 경우 내가 좋아하는 유튜브에 있는 노래를 mp3 파일로 매우 쉽고 빠르게 저장할 수 있는 사이트를 소개하려고 한다. 웹사이트에서 제공하는 서비스이기 때문에 프로그램을 설치할 필요가 없고 또한 가장 중요한 것은 완전한 무료라는 장점이 있다. 유튜브 영상을 녹음하기 위해 여러 프로그램들을 찾아봤지만 컴퓨터에 설치해야 하는 번거로움은 물론이고 무료라고 되어 있지만 완전한 무료가 아닌 돈을 지불하지 않으면 제한된 기능만 제공하는 경우가 많았다. 하지만 이번에 소개할 사이트(recordmp3.co)는 매우 쉽고 빠르면서 무료로 유튜브 음악을 mp3로 저장할 수 있도록 해준다. 이제 그 사용방법을 알아보도록 하자.


2. 사용 방법

1) 해당 웹사이트로 이동

아래 링크를 누르거나 주소를 복사하여 해당 사이트로 이동한다.

https://recordmp3.co/

drawing

2) 유튜브 노래의 주소 복사

저장하고 싶은 해당 유튜브 노래 영상 링크의 주소를 복사한다.

drawing

3) 유튜브 주소 붙여넣기

다시 recordmp3.co 웹사이트로 가서 복사된 유튜브 링크의 주소를 검색창에 붙여넣기 한다.

drawing

4) 변환된 mp3파일 다운로드

원하는 유튜브 영상의 주소를 입력하고 조금 기다리면 자동으로 mp3파일로 인코딩하여 변환을 해준다. 이 때 주의할 점은 왼쪽 아래에 보이는 Download Recording 버튼을 눌러야 한다는 것이다. 중간에 있는 Download 버튼을 누를 경우 광고 사이트로 이동하니 반드시 음악을 다운로드 하기 위해서는 왼쪽 아래의 Download Recording 버튼을 누르도록 한다.

drawing

다운로드 버튼을 클릭한 뒤 음악을 저장할 폴더를 선택하고 저장한다.

drawing

이제 다운로드 된 파일을 확인하고 모바일로 옮겨주기만 하면 된다.

drawing

3. 결론

내가 좋아하는 해외 가수들의 노래가 스트리밍 어플에 없어서 유튜브로만 봐야하는 경우가 많았는데, 듣고 싶은 다양한 노래들을 recordmp3.co에서 무료로 mp3로 파일로 저장하여 들을 수 있어서 너무 좋다.

단점은 아직 모바일에서는 지원하지는 않는 것 같다. 모바일에서 브라우저를 통해 해당 사이트를 들어가면 mp3파일로 변환까지는 되는데 다운로드 버튼을 누르면 IP주소가 바뀌었다는 오류 메시지가 발생한다. 내 폰이 문제인지 모르겠지만 아무튼 나는 PC에서 파일을 다운로드하여 다시 모바일로 이동해야 하는 번거로움이 있다. 그것을 제외하고는 개인적으로 너무 편리하고 유용하다는 생각이 든다.




References

[1] RecordMP3. (?). Best Youtube to MP3 converter of 2020! [Web Page]



Hashtags

#유튜브 노래 저장 #유튜브 노래 #유튜브 노래 mp3로 저장 #유투브 노래 저장하는 법 #유튜브 노래 다운로드 하는 법 #유튜브 mp3 저장 #youtube mp3 #youtube to mp3 #youtube music download #youtube download #youtube mp3 converter #youtube sound converter #youtube mp3 download #how to convert youtube to mp3



© 2020, Byeongcheol Yoo. All rights reserved.


WRITTEN BY
아키텍토필
소프트웨어 아키텍트의 스터디 룸

,

Disclaimer

This document describes common linux commands. The commands in this document may or may not be supported on some particular linux/unix operating systems.
Please be aware that not all the options of the commands are described in this document. Only some major ones are introduced briefly. Therefore it is recommend that you look for other appropriate materials for further details.

'Others > Quick References' 카테고리의 다른 글

[Nginx] Full Example Configuration  (0) 2020.03.06
[Markdown] Cheat Sheet  (0) 2020.02.24

WRITTEN BY
아키텍토필
소프트웨어 아키텍트의 스터디 룸

,

윈도우 10에서 사운드 볼륨 크기 일정하게 만드는 법

 

1. 서론

유튜브를 시청하다 보면 갑자기 튀어나온 광고의 소리가 너무 커서 깜짝 놀란 적이 한 두 번이 아니다. 특히 시청하고 있던 유튜브 영상의 소리가 너무 작아서 전체 볼륨을 매우 크게 키워놓고 보고 있는데, 갑자기 튀어나온 광고의 소리가 상대적으로 훨씬 커서 그 소리에 귀가 따가워 엄청난 짜증이 유발될 때가 있다. 어차피 그 광고 제품에 관심은 없었지만 그 짜증스러운 경험으로 인해 괜시리 그 광고 제품에 대해 부정적인 감정이 쌓인다.

물론 요즘은 애드블록을 사용하기 때문에 유튜브 광고가 안 나타나긴 하지만, 대신 최근에는 넷플릭스로 영화나 드라마를 자주 보는 편인데, 전쟁이나 액션 장르를 좋아하다보니 영상에서 총을 쏘는 장면이나 폭발 장면 등이 나올 때 갑자기 소리가 너무 커져 귀가 아플 때가 있다.

그래서 해결 방법을 찾아보니 윈도우 10의 소리 설정에서 제공하는 라우드니스 이퀄라이제이션(loudness equalization) 기능을 발견하였다. 이 기능은 이름 그대로 매우 시끄러운 소리를 다른 소리들과 동등한 볼륨으로 만들어 준다. 따라서 시청하던 영상의 소리가 갑자기 커져도 자동으로 소리를 낮춰 평균적인 볼륨으로 조절해준다는 것이다.

이 기능을 사용하면 갑자기 튀어나온 엄청 큰 광고소리에 놀라거나 영화를 볼 때 갑작스러운 효과음이나 총소리 등에 놀라서 몸이 움찔하는 일이 없어질 것이다.
아래 방법에 따라 윈도우 10에서 사운드 볼륨 크기를 일정하게 유지하는 기능을 활성화시켜보자.

 

2. 설정 방법

1) 제어판 열기

키보드에서 Windows 키를 누르고 제어판(또는 Control Panel)을 검색해준다. 검색 리스트에 있는 제어판을 실행시킨다.

drawing

 

2) 하드웨어 및 소리

drawing

 

3) 시스템 소리 변경

drawing

 

4) 재생 탭 → 속성 클릭

drawing

 

drawing

 

5) 개선 기능 탭 → 라우드니스 이퀄라이제이션 체크 -> 확인 버튼

개선 기능 탭에서 스크롤을 맨 아래까지 내리면 라우드니스 이퀄라이제이션이 보인다. 이것을 체크해준다. 그리고 마지막으로 확인 버튼을 눌러 마무리한다.

drawing

 

drawing

 

drawing

 

3. 결론

유튜브를 시청할 때 중간에 광고가 나와도 소리 크기가 달라지지 않아 너무 좋다. 뿐만 아니라 예전에는 자동차 리뷰 영상을 볼 때 차량의 엔진소리를 자세히 들려주는 부분에서 소리가 너무 시끄러워서 볼륨을 줄이기도 했는데 이제는 알아서 자동으로 소리 크기를 적당하게 조절해주니 너무 편리하다.
진작에 왜 이 기능을 찾아보지 않았는지 후회가 될 정도이다. 소리 크기에 민감하여 잘 놀라시는 분들은 이 기능을 사용해 보시길 적극 추천드립니다.




References

[1] Mauro Huc. (2019, July 8). How to normalize sound volume on Windows 10 [Web Blog Post]

 


Hashtags

#윈도우10 소리 #윈도우 10 사운드 볼륨 #사운드 볼륨 #소리 크기 #유튜브 광고 소리 #광고 소리 줄이는 법 #사운드 볼륨 일정하게 하는 법 #윈도우 소리 크기 일정하게 #라우드니스 이퀄라이제이션 #유튜브 사운드 볼륨 일정하게 만들기 #윈도우 10 사운드 자동 조절 #windows 10 sound volume #loudness equalization #how to normalize sound volume #how to normalize Youtube sound volume #loudness normalization



© 2020, Byeongcheol Yoo. All rights reserved.

 


WRITTEN BY
아키텍토필
소프트웨어 아키텍트의 스터디 룸

,

[Markdown] Cheat Sheet

This topic is meant to give you a very basic overview of how Markdown works, showing some of the most frequently used operations.

Bold and Italic

This text **is bold**.
This text *is italic*.
This text ***is both bold and italic***. 
This text ~~is struck out~~.

This text is bold.

This text is italic.

This text is both bold and italic.

This text

is struck out

.

 

Header Text

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6

Line Continuation

By default Markdown adds paragraphs at double line breaks. Single line breaks by themselves are simply wrapped together into a single line. If you want to have soft returns that break a single line, add two spaces at the end of the line.


This line has a paragraph break at the end (empty line after).

Theses two lines should display as a single
line because there's no double space at the end.

The following line has a soft break at the end (two spaces or a \ at end)
This line should be following on the very next line.

You can use View -> Show Invisible Characters to show all white space and returns.


Links

You can easily link using [text](link) sytnax:

Markdown Monster Web Site

If you need additional image tags like targets or title attributes you can also embed HTML directly using raw HTML markup:

Go to the 
<a href="https://markdownmonster.west-wind.com" style="font-style: italic">
    Markdown Monster Web Site
</a>

renders:

Go to the

Markdown Monster Web Site


Images

Images are similar to links:

![Markdown Monster](https://markdownmonster.west-wind.com/Images/MarkdownMonster_Icon_128.png)

which renders:

Markdown Monster

You can embed images by pasting from the Clipboard (ctrl-v), using the @icon-image Image Dialog, or by dragging and dropping into the document from the the Folder Browser, or Explorer.

Block Quotes

Block quotes are callouts that are great for adding notes or warnings into documentation.

> ### @ icon-info-circle Headers break on their own
> Note that headers don't need line continuation characters as they are block elements and automatically break. Only text lines require the double spaces for single line breaks.

@icon-info-circle Headers break on their own

Note that headers don't need line continuation characters as they are block elements and automatically break. Only text lines require the double spaces for single line breaks.

You can also use simple block quotes:

> **Note:** Block quotes can be used to highlight important ideas.

Note: Block quotes can be used to highlight important ideas.

Fontawesome Icons

Help Builder includes a custom syntax for FontAwesome icons in its templates. You can embed a @ icon- followed by a font-awesome icon name to automatically embed that icon without full HTML syntax.

@ icon-gear Configuration

Emojiis

You can also embed Emojiis into your markdown using the Emoji dialog or common

:smile: :rage: :sweat: :point_down:

:-) :-( :-/ 

:smile: :rage: :sweat: :point_down:

:-) :-( :-/

HTML Markup

You can also embed plain HTML markup into the page if you like. For example, if you want full control over fontawesome icons you can use this:

This text can be embedded into Markdown:

<i class="fa fa-refresh fa-spin fa-2x"></i> &nbsp;**Refresh Page**

 Refresh Page

Note that blocks of raw HTML markup should be separated from text by empty lines above and below the HTML blocks.

Unordered Lists

* Item 1
* Item 2
* Item 3  
  • Item 1
  • Item 2
  • Item 3

This text is part of the third item. Use two spaces at end of the the list item to break the line.

A double line break, breaks out of the list.

Ordered Lists

If you want lines to break using soft returns use two
spaces at the end of a line.

1. **Item 1**  
Item 1 is really something
2. **Item 2**  
Item two is really something else
  1. Item 1
    Item 1 is really something
  2. Item 2
    Item two is really something else

If you want to lines to break using soft returns use to spaces at the end of a line.

Note: Numbered lists order themselves base on order rather than the number you use. All numbers can be the same and the list will order itself.

Now a nested list:

1. First, get these ingredients:

      * carrots
      * celery
      * lentils

2. Boil some water.

3. Dump everything in the pot and follow  
this algorithm:
  1. First, get these ingredients:

    • carrots
    • celery
    • lentils
    1. Boil some water.

    2. Dump everything in the pot and follow
      this algorithm:

Inline Code

If you want to embed code in the middle of a paragraph of text to highlight a coding syntax or class/member name you can use inline code syntax:

Inline code or member references  like `SomeMethod()` can be codified...

Inline code or member references like SomeMethod() can be codified... You can use the '{}'** menu or Ctrl-` to embed inline code.


Indented Code Blocks

Markdown supports code blocks syntax in a couple of ways:

Using and indented text block for code:

Some rendered text...

    // This is code by way of four leading spaces
    // or a leading tab
    int x = 0;
    string text = null;
    for(int i; i < 10; i++;) {
        text += text + "Line " + i;
    }

More text here

renders:

Some rendered text...

// This is code by way of four leading spaces
// or a leading tab
int x = 0;
string text = null;
for(int i; i < 10; i++;) {
    text += text + "Line " + i;
}

More text here

Fenced Code Blocks with Syntax Highlighting

You can also use triple back ticks plus an optional coding language to support for syntax highlighting.

The following is C# code.

```csharp
// this code will be syntax highlighted
for(var i=0; i++; i < 10)
{
    Console.WriteLine(i);
}
```  

which renders syntax colored code:

// this code will be syntax highlighted
for(var i=0; i++; i < 10)
{
    Console.WriteLine(i);
}

Many languages are supported: html, xml, javascript, typescript, css, csharp, fsharp foxpro, vbnet, sql, python, ruby, php, powershell, dos, markdown, yaml and many more. Use the Code drop down list to get a list of available languages.

You can also leave out the language to attempt auto-detection or use text for plain text:

```text
robocopy c:\temp\test d:\temp\test
```

renders plain, but formatted text:

robocopy c:\temp\test d:\temp\test

Note: Prefer using text for non-highlighted syntax over no syntax as no syntax tries to auto-discover the syntax which often is not correct. Always be specific with syntax specified.

Footnotes

Footnotes can be embedded like this:

Here is some text that includes a Footnote [^1] in the middle of its text. And here's another footnote [^2]. The actual footnotes render on the very bottom of the page.

[^1]: Source: Markdown Monster Web Site
[^2]: Source: Markdown Monster Web Site

Pipe Tables

Pipe Tables can be used to create simple single line tables:

|size | material     | color       |
|---- | ------------ | ------------|
|9    | leather      | brown **fox**  |
|10   | hemp canvas  | natural |
|11   | glass        | transparent |

size material color
9 leather brown fox
10 hemp canvas natural
11 glass transparent

Note: Cell lines don't have to line up to render properly. Max columns in any row determines table columns for the entire table. Pipe tables also don't need leading and trailing pipes to render as tables, but make sure you check compatibility with your final rendering site.

Grid Tables

Grid Tables are a bit more flexible than Pipe Tables in that they can have multiple lines of text per cell and handle multi-line embedded Markdown text.

+---------+---------+
| Header  | Header  |
| Column1 | Column2 |
+=========+=========+
| 1. ab   | > This is a quote
| 2. cde  | > For the second column 
| 3. f    |
+---------+---------+
| Second row spanning
| on two columns
+---------+---------+
| Back    |         |
| to      |         |
| one     |         |
| column  |         | 

+---------+---------+
| Header | Header |
| Column1 | Column2 |
+=========+=========+
| 1. ab | > This is a quote
| 2. cde | > For the second column
| 3. f |
+---------+---------+
| Second row spanning
| on two columns
+---------+---------+
| Back | |
| to | |
| one | |
| column | |

'Others > Quick References' 카테고리의 다른 글

[Nginx] Full Example Configuration  (0) 2020.03.06
[Linux] Common Commands  (0) 2020.02.26

WRITTEN BY
아키텍토필
소프트웨어 아키텍트의 스터디 룸

,