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

门户网站建设背景做网站公司哪家公司好

门户网站建设背景,做网站公司哪家公司好,seo技巧,哪个旅游网站做的最好docker安装nginx部署前端项目 拉取镜像 docker pull nginx:1.24.0运行容器 docker run --name nginx -p 80:80 -d nginx:1.24.0创建本地挂载的目录 mkdir -p /docker/nginx/conf mkdir -p /docker/nginx/log mkdir -p /docker/nginx/html复制运行的nginx配置到宿主机上 将…

docker安装nginx部署前端项目

拉取镜像

docker pull nginx:1.24.0

运行容器

docker run --name nginx -p 80:80 -d nginx:1.24.0

创建本地挂载的目录

mkdir -p /docker/nginx/conf
mkdir -p /docker/nginx/log
mkdir -p /docker/nginx/html

复制运行的nginx配置到宿主机上

将容器nginx.conf文件复制到宿主机
docker cp nginx:/etc/nginx/nginx.conf /docker/nginx/conf/nginx.conf
将容器conf.d文件夹下内容复制到宿主机
docker cp nginx:/etc/nginx/conf.d /docker/nginx/conf/conf.d
将容器中的html文件夹复制到宿主机
docker cp nginx:/usr/share/nginx/html /docker/nginx/
将容器中的日志log文件夹复制到宿主机
docker cp nginx:/var/log/nginx/ /docker/nginx/log

上述命令执行完毕删除运行的容器

docker stop 容器id
docker rm 容器id

正式运行

docker run  -p 80:80 -p 5010:5010   --restart=always --name nginxWeb -v /docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /docker/nginx/conf/conf.d:/etc/nginx/conf.d -v /docker/nginx/log:/var/log/nginx -v /docker/nginx/html:/usr/share/nginx/html -d nginx:1.24.0;

修改配置文件

server {listen       80;listen  [::]:80;server_name  localhost;#access_log  /var/log/nginx/host.access.log  main;location / {root   /usr/share/nginx/html/build;index  index.html index.htm;try_files   $uri   $uri/  /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   /usr/share/nginx/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 Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}
}server {listen       5010;listen  [::]:5010;server_name  localhost;#access_log  /var/log/nginx/host.access.log  main;location / {root   /usr/share/nginx/html/dist;index  index.html index.htm;try_files   $uri   $uri/  /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   /usr/share/nginx/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 Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}
}

修改完成重启容器

docker restart id
http://www.yayakq.cn/news/965318/

相关文章:

  • 成都专业网站建设公司排名网站首页 模板
  • 快捷建站专家视频网站建设服务
  • 网站流量站怎么做中国设计师联盟
  • 网站建设维护资质ps联盟网站
  • 一级A做爰片秋欲浓网站小程序定制开发要多少钱
  • 入侵网站怎么做弹出网站建设公司资讯
  • 福建省住房和城乡建设厅官方网站做彩票网站代理违法吗
  • 兴义市住房和城乡建设局网签网站天津公司网站推广
  • 企业网站建立答辩问题国际购物网站有哪些
  • 巨腾网站建设提升学历有什么作用和好处
  • 樟木头做网站做电音的软件的专业下载网站
  • 12306网站如何做解绑深圳学校网站定制设计
  • 专业的大良网站设计汽车网站开发流程
  • 低价网站建设多少钱企业网站功能清单
  • 深圳建站公司设计深业集团园区门户网站建设
  • 网站推广含义访问国外网站很慢
  • 高埗镇做网站漳州网站建设网站制作
  • 外面网站怎么做wordpress3.0
  • asp做的手机网站从事网站建设需要什么资质
  • seo企业推广案例太原百度seo
  • 门头设计网站推荐租赁网站开发
  • 深圳深圳网站开发公司注册资金新规定
  • 网站设计培训哪里好建个网站需要多少钱? 知乎
  • 北京专业网站制作大概费用职场社交网站怎么做
  • 网站搭建流程一同看网页打不开
  • 织梦网站专题页面如何做建筑做网站
  • 做塑胶网站需要什么装修论坛网站有哪些
  • 网站开发多少钱十堰建网站
  • 保定市做网站广西建设职业技术学院青年网站
  • jsp系统网站建设带源代码河北沧州市网络公司