티스토리 뷰

728x90
반응형

 포스팅은 Apache Application Deploy 과정을 살펴 보겠습니다.


 

Apache 2.4를 정상 기동하고 지난 시간에 Default Page까지 확인하였습니다.
오늘은 신규로 Application을 추가하고 Deploy 하는 과정을 살펴 보겠습니다.

먼저 Apache Config File을 열어 아래 내용을 확인합니다.

 #
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:\[NRSON] S-CORE\[SW]Apache\Apache24\htdocs"
<Directory "C:\[NRSON] S-CORE\[SW]Apache\Apache24\htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

위 빨간색으로 표시된 부분과 같이 Apache는 최초 설치 시 Home Directory 밑의 htdocs를 deploy 합니다.

해당 Directory는 다음과 같습니다.



index.html 파일이 있고 해당 파일은
단순하게 <html><body><h1>It works!</h1></body></html> 내용만을 담고 있습니다.

자 그럼 신규로 작성한 Application을 등록해 보겠습니다.

기존 DocumentRoot / Drectory를 신규로 반영할 경로로 변경합니다.

1. Application Deploy 경로 변경  

#DocumentRoot "C:\[NRSON] S-CORE\[SW]Apache\Apache24\htdocs"
#<Directory "C:\[NRSON] S-CORE\[SW]Apache\Apache24\htdocs">

DocumentRoot "C:/[NRSON] S-CORE/[SW]CafeNote/CafeNote(v2.2.7)_forKnoxPortal_20170929/Demo"
<Directory "C:/[NRSON] S-CORE/[SW]CafeNote/CafeNote(v2.2.7)_forKnoxPortal_20170929/Demo">
 

2. URI 등록 

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#

<Directory />
    AllowOverride none
    Require all denied
</Directory>

Default가 모든 Request를 막는 상태로 시작하기에 해당 설정을 약간 변경해 줍니다.

<Directory />
    AllowOverride none
    Require all granted
</Directory>
 

3. 자 설정은 완료 되었고 재기동을 하도록 하겠습니다.
앞서 start / stop이외에 재기동을 위한 restart 옵션을 사용해도 무방합니다.

자 신규로 Deploy application을 호출해 보도록 하겠습니다. 



 

본 Application은 S-CORE의 CAFE DEMO Page입니다.
이와 같은 방법으로 자신이 원하는 Application을 Deploy 하여 운영 및 테스트를 수행하게 됩니다.

다음시간에는 WEB / WAS가 분리되는 이유를 살펴보고 WebServer에서는 어떠한 일을 담당하게 될 것인지 알아보도록 하겠습니다.
그럼 또뵙죠~!
# 댓글과 공감은 글쓴이에게 큰 힘이 됩니다.

728x90
반응형