本地host:
127.0.0.1 api.bull.com
127.0.0.1 js.bull.com
nginx配置
server {
listen 80;
server_name api.bull.com;
index index.php index.html index.htm;
location / {
root D:/serversoft/upupw/7.1/htdocs/bull;
index index.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 {
root D:/serversoft/upupw/7.1/htdocs/bull;
fastcgi_pass bakend;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi.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;
}
}
開啟前端:
npm install
npm run dev