前端
前端 build 代码及其 放置位置
后端
nginx.conf 配置
user root;worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;events {worker_connections 1024;
}http {include /etc/nginx/mime.types;default_type application/octet-stream;log_format main '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';access_log /var/log/nginx/access.log main;sendfile on;#tcp_nopush on;keepalive_timeout 65;#gzip on;include /etc/nginx/conf.d/*.conf;server {listen 443 ssl;ssl_certificate mengxin666888.asia_bundle.crt;ssl_certificate_key mengxin666888.asia.key;server_name mengxin666888.asia www.mengxin666888.asia;location / {root /etc/nginx/demo;index index.html index.htm;# 如果前端需要访问后端接口,请添加以下配置location /api/ {proxy_pass http://127.0.0.1:8889/;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;}}location /aaa9527/ {proxy_pass http://127.0.0.1:8889/;}#location / {# proxy_pass http://127.0.0.1:8889/;#}}
}
小程序