우분투 서버 셋팅하는 방법
서버 Apache/2.0.55 (Ubuntu) 입니다.
/etc/apache2/apache2.conf 에 httpd.conf,port.conf등을 인클루드하는 형태로 설정을 잡더군요.
질문의 요지는 하나의 ip:80 포트만 사용하여 두개의 도메인을 각각 다른 경로에 세팅해주는 방법입니다.
----------------------------------------
설정 파일가운데 호스트 관련 부분은 아래 내용이 전부입니다.
/etc/apache2/sites-available/default
/etc/apache2/sites-available/default
NameVirtualHost *
<VirtualHost *>
ServerAdmin master@gaetgol.net
DocumentRoot /home
#SerName gaetgol.net
#ServerAlias www.gaetgol.net
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
<VirtualHost *>
ServerAdmin master@gaetgol.net
DocumentRoot /home
#SerName gaetgol.net
#ServerAlias www.gaetgol.net
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
----------------------------------------
# 사용자 디렉토리
/etc/apache2/mods-enabled/userdir.conf
<IfModule mod_userdir.c>
UserDir www
UserDir disabled root
<Directory /home/*/www>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
</IfModule>
/etc/apache2/mods-enabled/userdir.conf
<IfModule mod_userdir.c>
UserDir www
UserDir disabled root
<Directory /home/*/www>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
</IfModule>
댓글 1개
takumi22
12년 전
감사합니다
게시글 목록
| 번호 | 제목 |
|---|---|
| 27925 | |
| 27922 | |
| 6972 | |
| 19602 |
JavaScript
jQuery 의 delegate 흉내내기
1
|
| 19601 |
JavaScript
script 디버깅 - JSHint
|
| 19599 |
jQuery
jQuery 롤링배너 플러그인
1
|
| 6961 | |
| 30941 | |
| 19597 | |
| 19596 | |
| 19595 | |
| 19594 |
JavaScript
스크립트 for문
|
| 30939 |
HTML
디바이스별 해상도 확인
1
|
| 19593 | |
| 6959 | |
| 6957 | |
| 6953 | |
| 27920 | |
| 19592 |
PHP
php oop 단일 모드
|
| 19591 | |
| 19590 |
PHP
IP class 비교 함수
|
| 6949 | |
| 6947 | |
| 20826 |
이미지관련
문자열이미지에 각종 필터를 적용한 결과
7
|
| 20823 |
이미지관련
이미지에 각종 필터를 적용한 결과
2
|
| 19589 |
jQuery
심플한 파일첨부 버튼과 jquery
|
| 27913 | |
| 27912 | |
| 19588 |
JavaScript
자바스크립트 시작날짜 종료날짜 유효성 검사 함수
|
| 20822 |
이미지관련
프레임이미지와 얼굴이미지 합치기
|
| 19587 | |
| 19586 |
PHP
한국 IP대역 체크
|
| 27887 | |
| 20819 | |
| 27883 | |
| 19585 | |
| 19584 | |
| 19583 |
JavaScript
중첩없이 랜덤수 뽑아내기
|
| 19582 | |
| 19581 | |
| 19580 | |
| 6945 | |
| 24622 | |
| 19578 |
JavaScript
자바스크립트에서 for문 사용시 속도차이
1
|
| 6938 | |
| 6935 | |
| 27880 | |
| 20818 | |
| 19575 | |
| 20815 |
이미지관련
이미지 너비에 맞게 문자열의 자동 개행
2
|
| 20812 | |
| 20809 |
이미지관련
문자열 그릴때 패딩 주기
2
|
| 6932 | |
| 6931 | |
| 6929 | |
| 19571 |
Mobile
html5 지원되는 os별 버전보기
3
|
| 19570 | |
| 20802 |
이미지관련
위치에 따른 이미지에 문자열 그리기
6
|
| 27877 | |
| 20797 | |
| 6923 | |
| 20795 |
이미지관련
문자열의 너비와 높이 구하기
1
|
| 6918 | |
| 6914 | |
| 20789 |
이미지관련
이미지에 글자 쓰기
5
|
| 6899 | |
| 27860 | |
| 6898 | |
| 27856 | |
| 6895 | |
| 6891 | |
| 6890 | |
| 6881 | |
| 6874 | |
| 27852 | |
| 6860 | |
| 6857 | |
| 19569 | |
| 19565 | |
| 19564 | |
| 27844 | |
| 19563 | |
| 24617 | |
| 19554 | |
| 6854 | |
| 19553 | |
| 19531 | |
| 6850 | |
| 6848 | |
| 27842 | |
| 6846 | |
| 6842 | |
| 6839 | |
| 6834 | |
| 6829 | |
| 6824 | |
| 6820 | |
| 27839 | |
| 6818 | |
| 19529 |
JavaScript
그누보드5 에 Daum 우편번호 찾기 API 연동 하기
1
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기