Ubuntu+Apache2+Mono+MVC3

1.安装ssh(上传文件用,也可以用FTP)

sudo apt-get install openssh-server

2.安装Apache2

apahe2:sudo apt-get install apache2

3.安装mono及其apache组件

sudo apt-get install mono-complete mono-apache-server4 libapache2-mod-mono

4.apache站点配置

<VirtualHost *:80>
 ServerName localhost
 ServerAdmin web-admin@localhost
 DocumentRoot /var/www
 MonoServerPath localhost "/usr/bin/mod-mono-server4"
 MonoDebug localhost true
 MonoSetEnv localhost MONO_IOMAP=all
 MonoApplications localhost "/:/var/www"
 <Location "/">
 Allow from all
 Order allow,deny
 MonoSetServerAlias localhost
 SetHandler mono
 SetOutputFilter DEFLATE
 SetEnvIfNoCase Request_URI "/.(?:gif|jpe?g|png)$" no-gzip dont-vary
 </Location>
 <IfModule mod_deflate.c>
 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
 </IfModule>
 </VirtualHost>

5.设置文件夹权限

sudo chmod 755 /var/www

Ubuntu+Apache2+Mono+MVC3,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。