标签:index http 配置 nginx 例子 location pass home proxy
nginx 配置
配置文件上传大小
client_max_body_size 40m;
保存后 nginx -s reload 后还是不行,
解决:采用taskkill /f /im nginx.exe命令杀死进程,再stat nginx 就行了。。。
配置vue
server {
listen 8192;
server_name suncereltd.6655.la;
client_max_body_size 500m;
proxy_max_temp_file_size 500m;
location / {
root /home/water/suncere.direct.networking.water.frontend/dist/;
try_files $uri $uri/ /index.html;
}
location /api/base/
{
proxy_pass http://localhost:4483;
}
location /api/business/
{
proxy_pass http://localhost:4483;
}
location /wwww/.*\.(docx|doc)
{
proxy_pass http://localhost:4483;
}
location ~ .*\.(docx)$
{
#proxy_pass http://localhost:4483;
root /home/water/water-direct/wwwroot/download/;
}
#location ~ .*\.(docx)$
#{
# proxy_pass http://localhost:4483;
#}
}
单个端口,用路径区分,配置2个vue项目
server {
listen 8321;
server_name suncereltd.6655.la;
location /map/ {
# root /home/tongchuan/dist;
alias /home/weifang/map/;
index index.html index.htm;
}
location / {
root /home/weifang/map/;
index index.html index.htm;
}
location /bs/ {
# root /home/tongchuan/dist;
alias /home/weifang/water/;
index index.html index.htm;
}
location /App_Data/AduitFiles/ {
root /home/weifang/webhost;
}
location ^~ /static/outlet/ {
rewrite ^/(.*) http://suncereltd.6655.la:8321/#/$1 last;
}
# location /api/ {
# proxy_pass http://localhost:4402/api/;
# }
location /api/ {
proxy_pass http://localhost:8328/api/;
}
}
标签:index,http,配置,nginx,例子,location,pass,home,proxy 来源: https://blog.csdn.net/qq_41288680/article/details/122474449
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。