본문 바로가기
IT기술/Windows 계열

[Windows] webtob 설치 및 기본 세팅 (vhost 추가 설정)

by Travelo 2022. 2. 21.
728x90
반응형
SMALL

 

#webtob5 설치하기

1. webtob5 #환경변수 설정

내 PC > 속성 > 고급시스템 설정 > 고급  환경변수 선택

path 에 webtob/bin 경로 추가 (설치경로에 따라 다름)

WEBTOBDIR 설정

WEBTOBDIR ( webtob 설치 경로에 해당)

설정 적용 시 wsconfig 생성됩니다.

D:\>wscfl -i http.m

webtob 부팅

D:\>wsboot

webtob 기동 확인

로컬에서 http://localhost:8080/index.html 입력

기본 기동 확인 완료

 

 

반응형

 

#vhost 추가

http.m 파일에서 vhost 추가 후 저장

 

*DOMAIN
webtob1

*NODE
DESKTOP-DXXXXXX	WEBTOBDIR="D:/webtob", 
		SHMKEY = 54000,
		DOCROOT="D:/webtob/docs",
		PORT = "8080", 
		HTH = 1,
		HOSTNAME ="www.test.com"
		NODENAME = "$(NODENAME)",
		ERRORDOCUMENT = "503",
		#Options="IgnoreExpect100Continue",
		#JSVPORT = 9900,
		LOGGING = "log1",
		ERRORLOG = "log2",
		SYSLOG = "syslog"
		
*vVhost
vhost1 HOSTNAME ="www.aaa.com"
	   DOCROOT="D:/webtob/docs/aaa",
	   PORT = "8080", 
	   LOGGING = "log1",
	   ERRORLOG = "log2"
	
vhost1 HOSTNAME ="www.bbb.com"
	   DOCROOT="D:/webtob/docs/bbb",
	   PORT = "8080", 
	   LOGGING = "log3",
	   ERRORLOG = "log4"

변경된 설정 적용

D:\>wscfl -i http.m

host에서 local host 설정에 local host 등록

C:\Windows\System32\drivers\etc/hosts
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      111.54.94.97     rhino.acme.com          # source server
#       11.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

127.0.0.1 aaa.com bbb.com
 

 

webtob/docs/ 하위에 aaa, bbb 디렉토리 생성 후 각 디렉토리에 리소스 저장

브라우저에서 http://aaa.com:8080/aaa/aaa.html 로 동작 확인

http://bbb.com:8080/bbb/bbb.html 로 동작 확인

 

728x90
반응형
LIST

댓글