1. 在Apache下建立新的web site
a. $>cd /etc/apache2/
b. $>vi ports.conf
填加Listen 8090(注意不要打开8080,因为Tomcat使用了这个端口)
c. $>cd sites-availabel
d. $>cp default mysite
e. $>vi mysite
<VirtualHost *:8090>
DocumentRoot /home/sdikerdong/www/
<Directory /home/sdikerdong/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
SetHandler mono
DirectoryIndex index.aspx index.html
</Directory>
</VirtualHost>
f. ln -s /etc/apache2/site-available/mysite /etc/apache2/site-enable/mysite
g. /etc/init.d/apache2 restart
经过以上步骤就可以访问 (当然,你要在/home/sdikerdong/www下面建好index.html)
2. 使mono在Apache下面有效
should install mono runtime before following steps
$> apt-get install mono (或都mono-devel)
a. If Apache is running it must be stopped before installing mod_mono: /etc/init.d/apache2 stop
b. $>sudo apt-get install libapache2-mod-mono
c. $>sudo apt-get install mono-apache-server2
e. $>sudo a2enmod mod_mono
f. Restart Apache: /etc/init.d/apache2 restart
参考