nginx配置如下:nginx.confuserwww-data;worker_processesauto;pid/run/nginx.pid;events{worker_connections768;#multi_accepton;}http{sendfileon;keepalive_timeout65;types_hash_max_size2048;include/etc/nginx/mime.types;default_typeapplication/octet-stream;ssl_protocolsTLSv1TLSv1.1TLSv1.2;#DroppingSSLv3,ref:POODLEssl_prefer_server_cipherson;access_log/var/log/nginx/access.log;error_log/var/log/nginx/error.log;gzipon;gzip_disable"msie6";access_log/var/log/nginx/access.log;error_log/var/log/nginx/error.log;gzipon;gzip_disable"msie6";include/etc/nginx/conf.d/*.conf;include/etc/nginx/sites-enabled/*;}sites-enabled>defaultserver{listen80default_server;listen[::]:80default_server;root/var/www/html;#Addindex.phptothelistifyouareusingPHPindexindex.htmlindex.htmindex.nginx-debian.html;server_name_;location/{#Firstattempttoserverequestasfile,then#asdirectory,thenfallbacktodisplayinga404.proxy_passhttp://127.0.0.1:3000;try_files$uri$uri/=404;}location~.*\.(js|css|png|jpg|gif|swf|ico|pdf|mov|mp3|wav|json|woff2)${proxy_passhttp://127.0.0.1:3000;}location/api/{proxy_passhttp://127.0.0.1:3002/api/;}}重启后访问xxx.com可以访问到xxx.com:3000的页面,但是访问xxx.com/home就拿不到xxx.com:3000/home的页面了我需要怎么修改让xxx.com/xxx获取到xxx.com:3000/xxx的页面呢另外:页面是使用vue-ssr服务端渲染的,当访问xxx.com/xxx的时候,entry-server入口文件没有打印,那应该就是请求没进到3000端口来
添加回答
举报
0/150
提交
取消