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)