松江电梯维保:Windows 下使用 Nginx Mono 部署 ASP.Net
来源:百度文库 编辑:偶看新闻 时间:2024/04/28 14:38:02
Windows 下使用 Nginx+Mono 部署 ASP.Net
自 Mono 1.9 以来,ASP.Net 也能通过 Mono 的 fastcgi-mono-server2 在 FastCGI 下运行了,更为可贵的是,Mono 兼容 Windows ;我们可以在 Windows 下利用 lighttpd、nginx 或 Apache 等服务器上部署 ASP.Net。
我将 Mono for Windows 的 FastCGI-Mono-Server 提取出来。
而 Nginx 目前也支持 Windows,是部署 Web 服务器的一个非常不错的选择,你可以在 Nginx 的官方网站找到下载。
下面是我对 Nginx nginx.conf 的配置,蓝色文字属于关键内容。
worker_processes 1;
error_log logs/error-debug.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type text/plain;
sendfile on;
keepalive_timeout 65;
index index.html index.htm;
server {
listen 80;
server_name yourdomain.com;
index index.aspx default.aspx;
location / {
root D:\www/yourwebapp;
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}
}
}
然后将上面的 FastCGI-Mono-Server 提取出来,所有文件全部注册到 GAC(否则 Web 应用会找不到他们,当然你也可以直接放到 webapp/bin),然后解压到某个文件夹,这里假设为 D:/FastCGI-Mono-Server。
之后我们就可以按下列命令运行 FastCGI:
fastcgi-mono-server2 /socket=tcp:127.0.0.1:8000 /root="D:\www\yourwebapp" /applications=yourdomain.com:/:. /multiplex=True
最后执行运行 Nginx 服务器,我们的 ASP.Net 程序就能脱离 IIS 这个臃肿的家伙运行啦!!!
自 Mono 1.9 以来,ASP.Net 也能通过 Mono 的 fastcgi-mono-server2 在 FastCGI 下运行了,更为可贵的是,Mono 兼容 Windows ;我们可以在 Windows 下利用 lighttpd、nginx 或 Apache 等服务器上部署 ASP.Net。
我将 Mono for Windows 的 FastCGI-Mono-Server 提取出来。
而 Nginx 目前也支持 Windows,是部署 Web 服务器的一个非常不错的选择,你可以在 Nginx 的官方网站找到下载。
下面是我对 Nginx nginx.conf 的配置,蓝色文字属于关键内容。
worker_processes 1;
error_log logs/error-debug.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type text/plain;
sendfile on;
keepalive_timeout 65;
index index.html index.htm;
server {
listen 80;
server_name yourdomain.com;
index index.aspx default.aspx;
location / {
root D:\www/yourwebapp;
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
}
}
}
然后将上面的 FastCGI-Mono-Server 提取出来,所有文件全部注册到 GAC(否则 Web 应用会找不到他们,当然你也可以直接放到 webapp/bin),然后解压到某个文件夹,这里假设为 D:/FastCGI-Mono-Server。
之后我们就可以按下列命令运行 FastCGI:
fastcgi-mono-server2 /socket=tcp:127.0.0.1:8000 /root="D:\www\yourwebapp" /applications=yourdomain.com:/:. /multiplex=True
最后执行运行 Nginx 服务器,我们的 ASP.Net 程序就能脱离 IIS 这个臃肿的家伙运行啦!!!
什么是MO??怎么下MO?
怎样使用mo
如何使用MO下载
如何使用mo下载
如何使用MO下载?
怎么使用Mo,
怎么使用mo电信
windows 下 azureus 怎么使用 ?
MO盘是什么?怎样使用?
MO是如何使用的
MO如何使用,详细点
MO如何使用,详细点
MO下载是什么,怎么下?
MO 怎么下?//
怎么用MO下东西??
MO下载是什么意思,怎么下
MO~~~~~~~~
windows下无法使用DOS应用程序
GHOST可以在WINDOWS下使用吗?
windows下使用的抓图键是哪个啊?
在WINDOWS XP 下如何使用GHOST
windows xp 下无法使用打印机?
如何在Windows下使用Ghost
怎样在windows下强制使用dos?