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
posted on 2014-03-24 23:33  Robbery  阅读(1262)  评论(2编辑  收藏  举报