Linux下Nginx + mono安裝與配置

1.安裝 nginx 編譯安裝時注意 prec zlib 等前置nginx 包 2.安裝 mono centos官網沒有編譯好的包,須要下載源碼編譯,穩定版 wget http://download.mono-project.com/sources/mono/mono-2.10.6.tar.bz2 //wget http://download.mono-project.com/sources/mod_mono/mod_mono-2.10.tar.bz2(Apache fastcgi模塊) wget http://download.mono-project.com/sources/xsp/xsp-2.10.2.tar.bz2 tar –jxvf xsp-2.10.2.tar.bz2 cd xsp-2.10.2 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig (若是沒有這個,在下步提示無mono庫) ./configure make make install 壓縮 tar -jcxf **.tar.bz2 解壓縮tar -jxvf **.tar.bz2 穩定版 http://ftp.novell.com/pub/mono/sources-stable/ 參考 http://hi.baidu.com/xc_hai/blog/item/554aa1dc7a6c5dc28c1029c7.html http://www.haogongju.net/art/82011 http://hi.baidu.com/xc_hai/blog/item/0b36d82d65e89ff78b13995e.html http://blog.csdn.net/lanxe/article/details/6682218 說明:centos 5.4 nginx 1.0.9 mono 2.10.6  須要安裝xsp(官方小型.Net Web服務器,能夠單獨做爲Web服務器,其中的fastcgi-mono-server2/4也可做爲nginx的fastcgi方式運行) fastcgi 支持nginx(也能夠安裝fastcgi-mono-server:svn獲取 http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/,二者差異暫未知) 或者參考 http://blog.bookcold.me/2011/05/693 統一 安裝mono xsp2 mono_apache 3.配置nginx.conf server {          listen   80;          server_name  127.0.0.1;          access_log   /var/log/nginx/your.domain1.xyz.access.log;            location / {                  root /var/www/aspx/;                  index index.html index.htm default.aspx Default.aspx;                  fastcgi_index Default.aspx;                  fastcgi_pass 127.0.0.1:9001;                  fastcgi_param SCRIPT_FILENAME /var/www/aspx/$fastcgi_script_name;                  include fastcgi_params;          }  } 4.配置fastcgi_params (若是在nginx 中配置fastcgi_param,則再也不配置如上); fastcgi_param  PATH_INFO          ""; fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name; 5.啓動fastcgi fast-momo-server:fastcgi-mono-server4 .Net 4.0 fastcgi-mono-server2 /applications=aspx:/:/var/www/aspx/ /socket=tcp:127.0.0.1:9001 & nohup fastcgi-mono-server4 /applications=/:/var/www/aspx/ /socket=tcp:127.0.0.1:9001 & (後臺程序運行) 6.重啓nginx 啓動Nginx,在/var/www/aspx/目錄下下載info.apsx的ASP.NET探針文件,以檢查ASP.NET程序可否正常運行: cd /var/www/aspx/ wget http://aspnetsysinfo.googlecode.com/files/aspnetsysinfo-revision_23.zip  unzip aspnetsysinfo-revision_23.zip 
相關文章
相關標籤/搜索