vue.js|vue.js 与 php前后端分离 服务器本地配置

本地host:

127.0.0.1 api.bull.com 127.0.0.1 js.bull.com

nginx配置
server { listen80; server_nameapi.bull.com; indexindex.php index.html index.htm; location / { rootD:/serversoft/upupw/7.1/htdocs/bull; indexindex.html index.htm default.html default.htm index.php default.php app.php u.php; try_files $uri $uri/ /index.php?$query_string; } location ~ ^.+\.php { rootD:/serversoft/upupw/7.1/htdocs/bull; fastcgi_passbakend; fastcgi_indexindex.php; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_paramPATH_INFO $fastcgi_path_info; fastcgi_paramPATH_TRANSLATED $document_root$fastcgi_path_info; includefastcgi.conf; } location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { } location ~ /\.ht { deny all; } }server { listen 80; server_name js.bull.com; location / { proxy_pass http://localhost:8080; } }

【vue.js|vue.js 与 php前后端分离 服务器本地配置】开启前端:
npm install
npm run dev
vue.js|vue.js 与 php前后端分离 服务器本地配置
文章图片
image.png vue.js|vue.js 与 php前后端分离 服务器本地配置
文章图片
image.png

    推荐阅读