浅析linux上如何让apache运行aspx网站即asp.net代码
参考:
http://www.cnblogs.com/jeromejiang/archive/2009/06/15/1503436.html
1. 安装asp2.0
luther@gliethttp:~$ sudo apt-get install apache2 mono-gmcs mono-utils monodoc-http libapache2-mod-mono mono-apache-server1 mono-apache-server2 asp.net2-examples
2. 配置.conf
luther@gliethttp:~$ sudo ln -s /etc/apache2/mods-available/mod_mono_auto.conf /etc/apache2/mods-enabled/mod_mono.conf
luther@gliethttp:~$ sudo ln -s /etc/apache2/mods-available/mod_mono_auto.load /etc/apache2/mods-enabled/mod_mono.load
luther@gliethttp:~$ sudo vim /etc/apache2/mods-available/mod_mono.conf
# 将mono的地址由默认的mod-mono-server2改为mod-mono-server
# 然后我们可以
# ln -s /usr/bin/mod-mono-server1 /usr/bin/mod-mono-server
# ln -s /usr/bin/mod-mono-server2 /usr/bin/mod-mono-server
# 来自动切换
MonoServerPath "/usr/bin/mod-mono-server"
MonoAutoApplication enabled
luther@gliethttp:~$ sudo service apache2 restart
luther@gliethttp:~$ sudo cp -a /usr/share/asp.net2-demos/* /var/www/
3. 使用实例测试
运行asp2.0
luther@gliethttp:~$ sudo rm /usr/bin/mod-mono-server
luther@gliethttp:~$ sudo ln -s /usr/bin/mod-mono-server2 /usr/bin/mod-mono-server
luther@gliethttp:~$ sudo service apache2 restart
luther@gliethttp:~$ firefox
运行asp1.0
luther@gliethttp:~$ sudo rm /usr/bin/mod-mono-server
luther@gliethttp:~$ sudo ln -s /usr/bin/mod-mono-server1 /usr/bin/mod-mono-server
luther@gliethttp:~$ sudo service apache2 restart
luther@gliethttp:~$ firefox
阅读(4290) | 评论(0) | 转发(0) |