配置文件



笔记插图(第 1 页)

笔记插图(第 1 页)

笔记插图(第 1 页)

nginx.conf 5.28KB

1
  #user  nobody;
2  worker_processes  1;
3  #error_log  logs/error.log;
4  #error_log  logs/error.log  notice;
5  #error_log  logs/error.log  info;
6  #pid        logs/nginx.pid;
7  events {
8      worker_connections  1024;
9  }
10  http {
11      include       mime.types;
12      default_type  application/octet-stream;
13      #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
14      #                  '$status $body_bytes_sent "$http_referer" '
15      #                  '"$http_user_agent" "$http_x_forwarded_for"';
16      #access_log  logs/access.log  main;
17      sendfile        on;
18      #tcp_nopush     on;
19      #keepalive_timeout  0;
20      keepalive_timeout  65;
21      #gzip  on;
22      server {
23          listen       80;
24          server_name  localhost;
25          #charset koi8-r;
26          #access_log  logs/host.access.log  main;
27          location / {
28              root   html;
29              index  index.html index.htm;
30          }
31          #error_page  404              /404.html;
32          # redirect server error pages to the static page /50x.html
33          #
34          error_page   500 502 503 504  /50x.html;
35          location = /50x.html {
36              root   html;
37          }
38          # proxy the PHP scripts to Apache listening on 127.0.0.1:80
39          #
40          #location ~ \.php$ {
41          #    proxy_pass   http://127.0.0.1;
42          #}
43          # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
44          #
45          #location ~ \.php$ {
46          #    root           html;
47          #    fastcgi_pass   127.0.0.1:9000;
48          #    fastcgi_index  index.php;
49          #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
50          #    include        fastcgi_params;
51          #}
52          # deny access to .htaccess files, if Apache's document root
53          # concurs with nginx's one
54          #
55          #location ~ /\.ht {
56          #    deny  all;
57          #}
58      }
59
60
61      ##################sql设计器#################
62      server {
63          listen   2600;
64          server_name 211.67.156.19;
65          charset utf-8;
66          location / {
67              root   /home/dma/designer/html;
68              index  index.html index.htm;
69              #try_files $uri $uri/ /index.html;
70          }
71          location /dma/{
72              proxy_pass  http://211.67.156.19:3600/dma/;
73          }
74          location /dmm_cas/ {
75              proxy_pass  http://211.67.156.19:8080/cas;
76          }
77          error_page   500 502 503 504  /50x.html;
78          location = /50x.html {
79              root   html;
80          }
81      }
82      ##################人事主题#################
83      server {
84          listen   2700;
85          server_name 211.67.156.19;
86          charset utf-8;
87          location / {
88              root   /home/dma/server/rszt;
89              index  index.html index.htm;
90              #try_files $uri $uri/ /index.html;
91          }
92          location /dma/{
93              proxy_pass  http://211.67.156.23:3700/dma/;
94          }
95          location /dmm_cas/ {
96              proxy_pass  http://211.67.150.38:8088/dmm_cas;
97          }
98          error_page   500 502 503 504  /50x.html;
99          location = /50x.html {
100              root   html;
101          }
102      }
103
104
105      ##################学生主题#################
106      server {
107          listen   2710;
108          server_name 211.67.156.19;
109          charset utf-8;
110          location / {
111              root   /home/dma/server/xszt;
112              index  index.html index.htm;
113              #try_files $uri $uri/ /index.html;
114          }
115          location /dma/{
116              proxy_pass  http://211.67.156.23:3710/dma/;
117          }
118          location /dmm_cas/ {
119              proxy_pass  http://211.67.150.38:8088/dmm_cas;
120          }
121          error_page   500 502 503 504  /50x.html;
122          location = /50x.html {
123              root   html;
124          }
125      }
126      ##################资产主题#################
127      server {
128          listen   2720;
129          server_name 211.67.156.19;
130          charset utf-8;
131          location / {
132              root   /home/dma/server/assets;
133              index  index.html index.htm;
134              #try_files $uri $uri/ /index.html;
135          }
136          location /dma/{
137              proxy_pass  http://211.67.156.23:3720/dma/;
138          }
139          location /dmm_cas/ {
140              proxy_pass  http://211.67.150.38:8088/dmm_cas;
141          }
142          error_page   500 502 503 504  /50x.html;
143          location = /50x.html {
144              root   html;
145          }
146      }
147      ##################大屏主题#################
148      server {
149          listen   2740;
150          server_name 211.67.156.19;
151          charset utf-8;
152          location / {
153              root   /home/dma/server/dp;
154              index  index.html index.htm;
155              #try_files $uri $uri/ /index.html;
156          }
157          location /dma/{
158              proxy_pass  http://211.67.156.23:3740/dma/;
159          }
160          location /dmm_cas/ {
161              proxy_pass  http://211.67.150.38:8088/dmm_cas;
162          }
163          error_page   500 502 503 504  /50x.html;
164          location = /50x.html {
165              root   html;
166          }
167      }
168  ######################################################
169          server {
170                  listen   7700;
171                  server_name 211.67.156.19;
172                  charset utf-8;
173                  location / {
174                          root   /home/model;
175                          index  index.html index.htm;
176                  }
177          }
178      # another virtual host using mix of IP-, name-, and port-based configuration
179      #
180      #server {
181      #    listen       8000;
182      #    listen       somename:8080;
183      #    server_name  somename  alias  another.alias;
184      #    location / {
185      #        root   html;
186      #        index  index.html index.htm;
187      #    }
188      #}
189      # HTTPS server
190      #
191      #server {
192      #    listen       443 ssl;
193      #    server_name  localhost;
194      #    ssl_certificate      cert.pem;
195      #    ssl_certificate_key  cert.key;
196      #    ssl_session_cache    shared:SSL:1m;
197      #    ssl_session_timeout  5m;
198      #    ssl_ciphers  HIGH:!aNULL:!MD5;
199      #    ssl_prefer_server_ciphers  on;
200      #    location / {
201      #        root   html;
202      #        index  index.html index.htm;
203      #    }

204      #}

205  }