- 在easyswoole根目录下,新建一个webroot目录,将vue打包好的代码放到里面
- easyswoole.conf代码如下:
server {
listen 9002;
server_name 127.0.0.1;
#charset koi8-r;
access_log /php/host.access.log main;
location / {
root /php/easyswoole/webroot;
index index.html index.htm;
if (!-e $request_filename) {
proxy_pass http://127.0.0.1:9501;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}