아파치 virtual host에 대하여 질문드립니다.

kskyoon의 이미지

안녕하세요.

아파치 virtual host에 대하여 질문드립니다.

아파치 버젼은 1.3.29이구요

virtual hosting을 사용하여 아파치에 두 개의 서비스를

띄우려고 합니다. (root 권한으로 띄웁니다.)

서버의 IP가 10.20.6.77 이고 url이 test.abc.com 이라면

http://10.20.6.77 에서 웹서비스하고

http://10.20.6.77:8094 에서도 웹서비스를 하려고 합니다.

그래서 APACHE_HOME/conf/httpd.conf를 수정하였는데

다음과 같이 하였습니다.

Listen 80
Listen 8094

...

<VirtualHost 10.20.6.77:8094>
DocumentRoot "/www/test/web"
ServerName test.abc.com
ServerAdmin haha@abc.com
ErrorLog /usr/local/apache/logs/www_error_log
TransferLog /usr/local/apache/logs/www_access_log

# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
<Directory /admin>
Options ExecCGI
AllowOverride None
Require group admin
AuthName "System Manager"
AuthType Basic
AuthUserFile /www/myadmin/passwdFile/htpasswdFile
AuthGroupFile /www/myadmin/passwdFile/htgroup
</Directory>

</VirtualHost>

이렇게 설정하고

APACHE_HOME/bin/apachectl startssl 을 실행하였습니다.

http://10.20.6.77:8094/ 으로 접속하니

"페이지를 표시할 수 없습니다." 라는 메시지만 나옵니다.

DocumentRoot는 "/www/test/web" 으로 설정하였는데

/www/test/web은 drwxr-xr-x 로 설정되어 있고

이 디렉토리를 소유한 유저는 tester 이고 그룹은 test 입니다.

/www/test/web/index.html 파일은 권한은 -rw-rw-rw- 이고

소유자는 tester이고 그룹은 테스트입니다.

httpd.conf의 구성중에서 무엇이 문제인가요?

또는 파일이나 디렉토리의 권한 설정때문에 문제가 있는건가요?

잘아시는 분 있으시면 도움부탁드립니다.

GENIUS의 이미지

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /home/aaaa/public_html
ServerName aaa.abc.co.kr
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /home/bbbb/public_html
ServerName bbb.abc.co.kr
</VirtualHost>

ip는 1개 포트도 1개

url 이름만 다르게 서비스 됨...

이것이 가상 호스트...

리눅스 네트웍 개발 (FA) /유비쿼터스 네트웍 하드웨어 개발 프로젝트 진행/인터넷을 통한 원격제어/
리눅스 베이스 FA 구현/초소형 무선랜 모듈개발 진행중/리눅스 웹 통합시스템 구축

익명 사용자의 이미지

Port별로 운용하는 virtual hosting도 가능하지 않나요?

http://httpd.apache.org/docs/vhosts/examples.html#port

여기를 보면..
Setup: The server machine has one IP address (111.22.33.44) which resolves to the name www.domain.tld. If we don't have the option to get another address or alias for our server we can use port-based vhosts if we need a virtual host with a different configuration.
Server configuration:

...
Listen 80
Listen 8080
ServerName www.domain.tld
DocumentRoot /www/domain

<VirtualHost 111.22.33.44:8080>
DocumentRoot /www/domain2
...
</VirtualHost>

A request to www.domain.tld on port 80 is served from the main server and a request to port 8080 is served from the virtual host.

marten의 이미지

[프로그래밍 QnA] 에 적절하지 않은 주제군요..
[설치 및 활용 QnA] 로 옮기는게 어떨까 합니다.