Toss a bit, try to deploy MVC3 with Linux.
Using CentOS and Ubuntu, respectively, is easier to deploy with Ubuntu.
The procedure is as follows:
First, the terminal is operated as follows
sudo su-- Enter your password
apt-Get
apt-Get
apt-get Install Mono-fastcgi-server4
There are some problems with missing packages during the installation process. Depends on the actual installation
Pcre g++ zlib have a dependence on
sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev g++
Second, nginx configuration
Default
sudo vim/etc/nginx/sites-available/default
Change into
server {listen 80 Span style= "Color:rgb (0, 0, 0); >; server_name localhost; Root // {root /var /www/ .aspx; Fastcgi_index /site; Fastcgi_pass 0.1 : 8000 ; Include /etc/nginx/
The boot path is changed to Var/www, so a www folder should be created
sudo mkdir/var/www
It is recommended to change permissions because this folder needs to be shared and deployed remotely
777 /var/www
Fastcgi_params
sudo vim/etc/nginx/fastcgi_params
Finally insert the following two lines
Fastcgi_param path_info ""; fastcgi_param script_filename $document _root$fastcgi_ Script_name;
Third, start the service
Deploy the MVC3 site to www by sharing, and then start the service
sudo/etc/init.d/nginx startsudo fastcgi-mono-server4/applications=/:/var/www//socket=tcp: 127.0. 0.1:8000
Following the above, the deployment should already be completed.
However, there are some deployment issues that need to import MVC DLL support and import into the site Bin folder
System.Data.dllSystem.Web.ApplicationServices.dllSystem.Web.DynamicData.dllSystem.Web.Helpers.dllSystem.Web.Mvc.dllSystem . Web.Routing.dllSystem.Web.WebPages.Deployment.dllSystem.Web.WebPages.dllSystem.Web.WebPages.Razor.dll
Also, the database read problem, using MySQL, need to import
MySql.Data.dll
Enter Web. config, insert under <system.web>
<globalization culture="en-US" enableclientbasedculture="false "/>
All right, all done. Share your own deployment experience, hope to help you, I wish you all the smooth deployment O (∩_∩) o
Shenzhen Yuan Chong
Technical Manager: Five plus multiply