赞
踩
- vim nginx.conf
-
- #user nobody;
- worker_processes 1;
-
- events {
- worker_connections 1024;
- }
-
- http {
- include mime.types;
- default_type application/octet-stream;
-
- #upstream myserver { #这里是设置负载均衡的地方!
- #server 192.168.23.110:8080;
- #server 192.168.23.110:8081;
- #}
-
- sendfile on;
- keepalive_timeout 65;
-
- server {
- listen 80;
- server_name localhost;
-
- location / {
- #root html; #这里是你设置访问的路径,例如:/home/test/,html的路径在:/usr/local/nginx/html/里面(你需要把前端dist包放到/usr/local/nginx/html/下面)
- root /home/test; #你需要把前端dist包放到/home/test/下面
- index index.html index.htm;
- #proxy_pass http://myserver; #这里是上面设置负载均衡跳转的地方
-
- }
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
- }
-
-
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。