Run. NET in Ubuntu

Source: Internet
Author: User
Recently, I often see Nginx as a WEB server. I read it online. It seems to be really good. I just tried it on my Ubuntu. KAO is really fast, if you want to perform load balancing, consider it. I will not talk much about the installation steps. I am using the Ubuntu10.04 version. Although it is still a development version, it seems to be quite good now. Enter 1sudoapt-getinstallnginx on the terminal. If you want to use the latest

Recently, I often see Nginx as a WEB server. I read it online. It seems to be really good. I just tried it on my Ubuntu. KAO is really fast, if you want to perform load balancing, consider it.

Let's talk about the installation steps.

I am using the Ubuntu 10.04 version. Although it is still a development version, it seems very good now.

Input on the terminal

1 sudo apt-get install nginx

If you want to use the latest one, you 'd better add a sentence before.

1 sudo apt-get update

(These two steps can be achieved through a new hobby)

At this time, you have installed NGINX as the WEB server. How can you run it well? Input

1/etc/init. d/nginx start

Enter

1 http: // localhost/

If you see the content, OK, your server is successfully installed.

If you want to use. NET, you need to use the MONO guy.

Now we have two options.

1. XPS

2. Use fastcgi-mono-server

It depends on your choice.

Let's talk about fastcgi-mono-server,

Open on Terminal

Sudo gedit/etc/nginx. conf

Add

Server {
Listen 80;
Server_name localhost;
Location /{
Root/ver/www;
Index Default. aspx index. aspx;
Fastcgi_pass 127.0.0.1: 9000; # note that the following port must be the same
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
Include/etc/nginx/fastcgi_params;
}
}
}

To run the MVC website, you must open the terminal.

Sudo gedit/etc/nginx/fastcgi_params
 

Add

Fastcgi_param PATH_INFO "";
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
 

Okay. It's almost done here.

Open a terminal to run

Fastcgi-mono-server2/applications = www. domain1.xyz:/var/www // socket = tcp: 127.0.0.1: 9000
 

Remember not to close this

Start a terminal to run

Sudo/etc/init. d/nginx start
 

Put your WEB site in/var/www/and start your UBUNTU journey.

(If you do not want to copy it, you can use ROOT to copy it on the terminal)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.