Enable Nginx to support ASP. NET Configuration

Source: Internet
Author: User

Nginx is the world's top lightweight WEB server. More and more popular with website developers. Major Chinese websites have also adopted nginx as the production environment.

Share:

  1. # Asp (aspx) supports transferring client requests to IIS
  2. Location ~ * \. (Asp | aspx | asa) <# WebPartBody #> nbsp ;{
  3. Root D:/wwroot;
  4. Index. asp index. aspx;
  5. Proxy_pass http: // 127.0.0.1: 88;
  6. Proxy_set_header X-Real-IP $ remote_addr;
  7. }

Put the above section in nginx. conf. The range is in the Serer section where you need to support ASP sites. The second step is to enable the IIS Site. Port 88 (which can be modified by yourself). The site points to the site corresponding to nginx settings. In this way.

The following is a full article on the page I found, which may also be useful to you:

The following is the nginx configuration file. You must modify the default port of IIS no matter whether IIS is installed first or later, and then modify the IIS-related port in the configuration file accordingly.

  1. # Asp (aspx) supports transferring client requests to IIS
  2. Location ~ * \. (Asp | aspx | asa) <# WebPartBody #> nbsp ;{
  3. Root/host/wwwroot/www;
  4. Index. asp index. aspx;
  5. Proxy_pass http: // 127.0.0.1: 88;
  6. Proxy_set_header X-Real-IP $ remote_addr;
  7. }

 

  1. # Java (jsp) support: Transfers client requests to resin
  2. Location ~ * \. (Jsp | do) <# WebPartBody #> nbsp ;{
  3. Root/host/wwwroot/www;
  4. Index. jsp index. do;
  5. Proxy_pass http: // 127.0.0.1: 8080;
  6. Proxy_set_header X-Real-IP $ remote_addr;
  7. }

 

  1. # Forward client requests to fastcgi
  2. Location ~ . * \. (Php | php5 | php4 | shtml | xhtml | phtml | htm | html | shtml | shtm )? <# WebPartBody #> nbsp ;{
  3. Fastcgi_pass 127.0.0.1: 9000;
  4. Include/host/nginx/conf/fastcgi_params;
  5. }

The purpose is to use nginx's processing capabilities to deliver php and static pages to nginx for processing. iis is only responsible for processing asp and aspx-related content, and resin is only responsible for processing java-related content, all content is output from port 80 of nginx

 

This link provides a solution

Http://mkdot.net/blogs/slavco/archive/2010/01/23/11726.aspx

Http://zhangguofuwangyi.blog.163.com/blog/static/17175948720109461452894/

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.