当前位置: 首页> 房产> 建材 > 网站设计制作的四大优势_德国搜索引擎_点击器_营销软文范文200字

网站设计制作的四大优势_德国搜索引擎_点击器_营销软文范文200字

时间:2025/7/11 1:28:43来源:https://blog.csdn.net/u010609022/article/details/143686948 浏览次数:1次
网站设计制作的四大优势_德国搜索引擎_点击器_营销软文范文200字

安装homebrew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

安装Nginx

brew install nginx

 nginx相关命令

nginx启动命令:nginx

nginx -s reload  #重新加载配置
nginx -s reopen  #重启
nginx -s stop    #停止
nginx -s quit    #退出
nginx -V         #查看版本,以及配置文件地址
nginx -v         #查看版本
nginx -c filename #指定配置文件
nginx -h #帮助

启动之后,在浏览器输入http://localhost:8080  或 http://127.0.0.1:8080/地址来打开nginx

前端打包

npm run build

之后会在dist文件夹中生成代码

前端部署

前往/usr/local/etc找到nginx.conf修改配置

http {

include mime.types;

default_type application/octet-stream;


sendfile on;

keepalive_timeout 65;

#root xxx/xxx配置项目路径,不配置的话默认是html文件夹

server {

listen 28866; //项目访问端口号

server_name localhost; //项目访问地址

location / {

try_files $uri $uri/ @router;#需要指向下面的@router 否则会出现vue 的路由在nginx 中刷新出现404

index index.html index.htm;

}

location @router {

rewrite ^.*$ /index.html last;

}

location /api/ { //【/api/ 】是nginx转发标识

proxy_buffer_size 64k;

proxy_buffers 32 32k;

proxy_busy_buffers_size 128k;

proxy_pass http://localhost:8880/api/tp/; //api服务器地址

proxy_redirect default;

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root html;

}

}

进入/usr/local/Cellar/nginx/1.27.2/html,将打包的前端复制到 目录下

打开终端,使用nginx命令启动

打开浏览器访问 http://localhost:28866

完~

 

关键字:网站设计制作的四大优势_德国搜索引擎_点击器_营销软文范文200字

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: