当前位置: 首页 > news >正文

四川和住房城乡建设厅网站景区网站模板

四川和住房城乡建设厅网站,景区网站模板,自媒体平台排行榜前十名,技术支持 淄博网站建设今天部署了一个Vue项目到阿里云的云服务器上#xff0c;现记录该过程。 1. 修改Vue项目配置 我们去项目中发送axios请求的文件里更改一下后端的接口路由#xff1a; 2. 执行命令打包 npm run build ### 或者 yarn build 打包成功之后#xff0c;我们会看到一个dist包现记录该过程。 1. 修改Vue项目配置 我们去项目中发送axios请求的文件里更改一下后端的接口路由 2. 执行命令打包  npm run build ### 或者 yarn build 打包成功之后我们会看到一个dist包 3.安装Nginx 3.1. 安装对应的依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 3.2. 下载Nginx并解压 //创建一个文件夹 cd /usr/local mkdir nginx cd nginx //下载tar包 wget http://nginx.org/download/nginx-1.13.7.tar.gz tar -xvf nginx-1.13.7.tar.gz 3.3. 开始安装 //进入nginx目录 cd /usr/local/nginx //进入目录 cd nginx-1.13.7 //执行命令 考虑到后续安装ssl证书 添加两个模块 ./configure --with-http_stub_status_module --with-http_ssl_module //执行make命令 执行make install命令 make make install 3.4. 启动Nginx ​​​​​​​/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 3.5. 打开配置文件 # 打开配置文件 vi /usr/local/nginx/conf/nginx.conf 4. 把dist文件放置到/usr/local/nginx/html中: 5. 配置nginx.cnf 可以开始配置config文件了 server {listen 80;server_name localhost;#charset koi8-r;#access_log logs/host.access.log main;location / {root html/dist;try_files $uri $uri/ /index.html;}location ^~ /api {# 处理 Vue 单页面应用 路由模式为 history 模式刷新页面 404 的问题try_files $uri $uri/ /dist/index.html;}#error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location /50x.html {root html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {# proxy_pass http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {# root html;# fastcgi_pass 127.0.0.1:9000;# fastcgi_index index.php;# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;# include fastcgi_params;#}# deny access to .htaccess files, if Apaches document root# concurs with nginxs one##location ~ /\.ht {# deny all;#}} 成功输入服务器的公网地址就可以访问到项目了
http://www.pierceye.com/news/425614/

相关文章:

  • 校园网站建设网个人网站设计论文道客巴巴
  • 网站网站制作价格建站网站建立网站第一步是什么
  • 组织部信息化建设官方网站郑州平面设计公司
  • 可信网站标志网站分析数据
  • 个人求职网站设计惠州建网站
  • 南京网站制作学校南京有名的网站建设公司
  • wordpress 代码页面宁波专业优化网站制作公司
  • 中国建设行业网站第五届中国国际进口博览会召开时间
  • 做网站设计的有些什么职位wordpress h1 h2 h3
  • 广告公司寮步网站建设哪家好怎么样在百度上推广自己的产品
  • 做亚马逊和淘宝网站公司网站建设深圳
  • 济宁建设网站网站改版 合同
  • wordpress 网站费用北京网站建设 知乎
  • 网站设计师绩效网站页面那个图怎么做
  • 帮别人起名 做ppt的网站做一个网站需要服务器吗
  • 高端网站建设公司兴田德润可以不新产品推广策划方案
  • 建设银行如何网站设置密码嵊州市建设银行网站
  • 陕西 网站建设福州mip网站建设
  • 让人做网站 需要准备什么网站建设国内外现状
  • 滨海做网站公司网页设计模板 中文
  • 辽源市网站建设怎么学做电商
  • 做pc端网站行情网站标签化
  • 中国做的很好的食品网站php图片网站源码
  • 做自媒体小视屏哪个网站好邹平网站建设公司
  • 字体样式 网站layui 网站建设模板
  • 沈阳网站设计江苏城乡建设部网站首页
  • 网站手机端生成wordpress如何下载
  • 网站数据抓取怎么做营销型网站开发定制
  • 福州营销型网站建设中国建设工程信息网站
  • 怎么在服务器里面做网站公司网站模板怎么做