zoukankan      html  css  js  c++  java
  • Ubuntu 12.04使用uginx+fastcgi-mono-server2部署asp.net 网站

    Ubuntu 12.04使用uginx+fastcgi-mono-server2部署asp.net 网站

    1.安装nginxmono-fastcgi-server2

       sodu apt-get  install nginx

       sodu apt-get  install mono-fastcgi-server2

    2.配置 nginxmono-fastcgi-server2

      2.1 在终端输入sudo gedit /etc/nginx/nginx.conf 

          在http节点,添加以下server节点

              server {

          listen 80;

          server_name 127.0.0.1;

          location ~ {

            root /home/david/demo/demo/demo/;#网站的根目录

            index index.html index.htm default.aspx Default.aspx; fastcgi_index Index.aspx;   

            fastcgi_pass 127.0.0.1:9000; #对应mono-fastcgi-server2端口

            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params;

            }

          }

     

    2.2 在终端输入sudo gedit /etc/nginx/sites-available/default,将上面配置信息添加到server节点中。

     

    2.3在终端输入sudo gedit /etc/nginx/fastcgi_params  ,将以下配置信息加入最后。

       fastcgi_param PATH_INFO "";

      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    3.运行

    3.1 启动nginx

         sudo /etc/init.d/nginx start

    3.2 启动  fastcgi-mono-server端口

         sudo fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/home/david/demo/demo/demo/

    4,最后运行效果图

     

     

     

  • 相关阅读:
    前端展示(四)
    小谢第66问:页面关闭鼠标光标
    小谢第64问:nuxt项目中增加百度分析统计
    js 判断当前是手机还是电脑
    布谷鸟自定义教程
    vs code常用插件及配置
    小程序几件小事儿
    删除 json 数据中的某一项
    小程序图片预览
    小程序 navigator 取消点击效果
  • 原文地址:https://www.cnblogs.com/david1989/p/3633166.html
Copyright © 2011-2022 走看看