非淡泊无以明志,非宁静无以致远 -心静如止水,动于静

在Ubuntu下的Apache上建立新的website,以及enable mono

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

 

     经过以上步骤就可以访问 http://192.168.137.224:8090/index.html (当然,你要在/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

 

参考

https://help.ubuntu.com/community/ModMono#ASP.NET_2.0_AutoHosting_on_Ubuntu_12.04_Precise_Pangolin

http://wiki.ubuntu.org.cn/Apache%E8%99%9A%E6%8B%9F%E4%B8%BB%E6%9C%BA%E6%8C%87%E5%8D%97

http://www.mono-project.com/Mod_mono

http://www.92csz.com/study/linux/1.htm

http://linux.ubuntu.org.cn/

posted @ 2014-03-09 11:13  烟雨客  阅读(703)  评论(0编辑  收藏  举报