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

智慧团建网站登录操作开发网站的流程是

智慧团建网站登录操作,开发网站的流程是,深圳专业优定软件网站建设,米课wordpress建站1. 打包 在项目包的终端使用命令打包成dist文件。 npm run build2. Linux云服务器上创建文件夹 mkdir /home/www/dist注:dist文件夹不用创建,将打包好的dist.zip放进去,然后解压就行。 3. 安装nginx yum install -y nginx4. 修改配置文件…

1. 打包

在项目包的终端使用命令打包成dist文件。

npm run build

2. Linux云服务器上创建文件夹

mkdir /home/www/dist

注:dist文件夹不用创建,将打包好的dist.zip放进去,然后解压就行。

3. 安装nginx

yum install -y nginx

4. 修改配置文件

vim /etc/nginx/nginx.conf

配置文件原样:

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;events {worker_connections 1024;
}
http {log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';access_log  /var/log/nginx/access.log  main;sendfile            on;tcp_nopush          on;tcp_nodelay         on;keepalive_timeout   65;types_hash_max_size 4096;include             /etc/nginx/mime.types;default_type        application/octet-stream;# Load modular configuration files from the /etc/nginx/conf.d directory.# See http://nginx.org/en/docs/ngx_core_module.html#include# for more information.include /etc/nginx/conf.d/*.conf;server {listen       80;listen       [::]:80;server_name  _;root         /usr/share/nginx/html;# Load configuration files for the default server block.include /etc/nginx/default.d/*.conf;error_page 404 /404.html;location = /404.html {}error_page 500 502 503 504 /50x.html;location = /50x.html {}}# Settings for a TLS enabled server.
#
#    server {
#        listen       443 ssl http2;
#        listen       [::]:443 ssl http2;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers HIGH:!aNULL:!MD5;
#        ssl_prefer_server_ciphers on;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }}

我们可以看到其中一行

 include /etc/nginx/conf.d/*.conf;

说明他包含同级conf.d目录下的*.conf文件;所以根据个人喜好,我进入conf.d目录,创建xxx.conf文件,配置如下:

    server {listen       9999;server_name  _;root         /home/vue/dist;# Load configuration files for the default server block.include /etc/nginx/default.d/*.conf;error_page 404 /404.html;location = /404.html {}error_page 500 502 503 504 /50x.html;location = /50x.html {}location /{root /home/vue/dist;index index.html;try_files $uri $uri/ /index.html;} }    

被一个点卡了很久:!!!这个是用来解决刷新路由404问题,写全,可能因为版本问题,不写全导致一直说配置格式错误啥的…可累死我了!!!

        location / {root /home/vue/dist;index index.html;try_files $uri $uri/ /index.html;}  

5. 启动 / 重启 nginx

启动:

nginx

重启:

nginx -s reload

6. 访问前端项目

使用服务器 IP + 端口 访问前端项目。
注:端口需要在服务器防火墙开启对外开放。

http://www.yidumall.com/news/71065.html

相关文章:

  • 南昌seo站外优化如何给企业做网络推广
  • 温州h5建站以服务营销出名的企业
  • 推动政务网站建设百度快照是干嘛的
  • 川菜餐馆网站建设模板美食餐厅企业建站php源码程序aso优化前景
  • 下载室内设计排版模板网站有哪些疫情死亡最新数据消息
  • 网站上seo怎么做百度如何购买关键词
  • 盐城中小企业网络推广网站优化关键词价格
  • 上海法资企业名录百度推广优化技巧
  • 东莞网站建设dgtenma国内新闻最新5条
  • 宝山企业做网站佛山网站建设十年乐云seo
  • 网站推广和精准seo域名注册服务网站
  • 数据需求 网站建设大数据技术主要学什么
  • 郑州外贸网站建设公司价格免费网页在线客服系统代码
  • 学校门户网站什么意思百度搜索排名靠前
  • 班级网站建设图片企业文化墙
  • 什么是网站链接优化网络营销服务公司有哪些
  • 网站建设技术支持方案竞价恶意点击犯法吗
  • 专业做二手网站互联网营销师培训机构
  • wordpress 空间需求seo标题优化步骤
  • wordpress零基础建站教程资源最多的磁力搜索引擎
  • 百度推广做网站什么价位东莞网站制作
  • 做网站公司赚不赚钱长春网站开发公司
  • 辽中网站建设电商运营方案计划书
  • 网站建设怎么制作网站营销网址
  • 青岛 html5flash设计开发|交互设计|网站建设莆田百度推广开户
  • 网站开发设计项目书搜狗站长工具综合查询
  • 用手机做网站在线生成网页网站
  • 网站建设基本步骤廊坊网络推广公司
  • 南京政府门户网站建设的不足推广营销平台
  • 搭建网站用什么系统比较好用的搜索引擎