您的位置:首页 > 健康 > 美食 > 个人网页设计源代码_app开发一般收费_bt磁力库_百度网站收录提交

个人网页设计源代码_app开发一般收费_bt磁力库_百度网站收录提交

2024/12/15 7:24:11 来源:https://blog.csdn.net/weixin_61779644/article/details/143630038  浏览:    关键词:个人网页设计源代码_app开发一般收费_bt磁力库_百度网站收录提交
个人网页设计源代码_app开发一般收费_bt磁力库_百度网站收录提交

目录

1 准备挂载目录

2 拉去nginx镜像

3 启动命令


1 准备挂载目录

mkdir -p /temp/nginx/html #创建nginx的html挂载目录
mkdir -p /temp/nginx/conf #创建nginx的配置文件挂载目录

自定义nginx配置文件 放在conf目录下

 

#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#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  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       80;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;location / {root   html;index  index.html index.htm;}#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 Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

2 拉去nginx镜像

docker pull nginx

3 启动命令

docker run --name nginx \-p 443:443 -p 80:80 \-v /temp/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \-v /temp/nginx/html:/usr/share/nginx/html \-d nginx:latest
docker ps #看容器是否已经启动

访问 ip + 端口即可成功

版权声明:

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

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