Apache에 mono 모듈을 연동하여 aps.net 구동하기
<Test 환경>
OS : CentOS 5.5 i386
Apache 2.2.3
Mono : mono-web 1.2.4 / mod_mono 1.2.1
1. Mono web/mod 설치
[root@image ~]# yum install mono-web mod_mono
2. Mono module 환경설정
[root@image ~]# vi /etc/httpd/conf.d/mod_mono.conf
# mod_mono.conf
# Acthung! This file may be overwritten
# Use 'include mod_mono.conf' from other configuration file
# to load mod_mono module.
<IfModule !mod_mono.c>
LoadModule mono_module /usr/lib/httpd/modules/mod_mono.so
MonoServerPath /usr/bin/mod-mono-server2 <= 추가
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
</IfModule>
3. xps 예제 파일로 테스트하기 위해 xps 다운로드 및 설치
http://ftp.novell.com/pub/mono/download-stable/RHEL_5/src/
[root@image ~]# wget http://ftp.novell.com/pub/mono/download-stable/RHEL_5/src/mono-addon-xsp-2.10-5.7.src.rpm
[root@image ~]# rpm -ivh mono-addon-xsp-2.10-5.7.src.rpm
[root@image ~]# ll /usr/lib/xsp/
합계 12
drwxr-xr-x 2 root root 4096 3월 8 14:11 1.0
drwxr-xr-x 2 root root 4096 3월 8 14:11 2.0
drwxr-xr-x 5 root root 4096 3월 8 14:11 test
4. httpd.conf에 xps 셋팅
[root@image ~]# vi /etc/httpd/conf/httpd.conf
# 아래 부분 추가
Alias /test "/usr/lib/xsp/test"
MonoApplications "/test:/usr/lib/xsp/test"
<Location /test>
SetHandler mono
</Location>
[root@image ~]# service httpd start
5. 웹브라우저로 확인하기
<참고>
http://mono-project.com/Mod_mono#Mod_Mono_Configuration_Tool
댓글 없음:
댓글 쓰기