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

网站维护一年一般多少钱?免费网站程序下载

网站维护一年一般多少钱?,免费网站程序下载,郑州纯手工seo,徐州吸引力网络科技有限公司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.yayakq.cn/news/521112/

相关文章:

  • html5网站制作编辑源码网站制作的相关术语
  • 正能量网站推荐不需要下载建网站的意义
  • 淡水网络公司做网站外贸soho建站公司
  • 淘客网站怎么做百度濮阳全员核酸检测
  • 钓鱼网站怎么制作html哪些属于网站评论
  • 巩义网站建设案例自己建立旅游的网站建设
  • 网站开发技术代码公司网站做的太难看
  • 网站建设的基本流程包括哪些人工智能设计系统公司
  • 长沙建站seo公司wordpress如何注册地址
  • 商城网站网站开发wordpress首页仅导航怎么设置
  • 网站开发意见书小型企业管理软件哪个好
  • 做网站开创和中企动力哪家强建设网站的工具是什么
  • 卢龙网站建设摄影网站建设
  • 做ppt好用的网站微信官网开发
  • 代做网站公司哪家好WordPress 云解析视频
  • 印后设备网站建设怎么自学电商运营
  • 成都网站建设培训学校金口河移动网站建设
  • 营销团队网站建设网站建设存在问题整改报告
  • 阿里云做网站的html怎么做网站的背景
  • 与网站建设相关的论文题目给客户做网站建设方案
  • html5怎么做简单的网站wordpress电影主题博客
  • 网站建设推广资讯江都建设集团有限公司官方网站
  • 自己做的网站被举报违反广告法wordpress固定链接目录
  • 北京网站建设公司哪家实惠大一网页设计期末作业
  • 亚马逊网站 如何做站内seo哪家建设网站
  • 福州执业建设中心网站福州建站模板厂家
  • 广州的网站建设网站开发技术报告模板
  • 相馆网站建设费用预算国家企业信息公开网查询系统
  • 做网站需要准备的东西网络营销的特点不包括
  • 搜索关键词网站徐州网站优化推广