Docker - compose the file content
Version: '3'
Services:
Nginx:
Build:/nginx
Restart: always
Ports:
- "80-80
"- "443-443
"Volumes,
- ${APP_CODE_PATH} : ${APP_CODE_PATH_CONTAINER}
- ${APP_NGINX_PATH}/logs:/var/log/nginx
- ${APP_NGINX_PATH}/nginx. Conf:/etc/nginx/nginx. Conf: ro
- ${APP_NGINX_PATH}/conf. D/,/etc/nginx/conf. D/
- ${APP_BASE_PATH}/SSL:/SSL/rw
-/etc/localtime:/etc/localtime: ro
Depends_on:
- mysql
Networks:
- code - network
PHP:
Build:/PHP - FPM
Restart: always
Volumes,
- ${APP_CODE_PATH} : ${APP_CODE_PATH_CONTAINER}
- ${APP_PHP_PATH}/logs:/var/log/PHP
- ${APP_PHP_PATH}/PHP. Ini:/usr/local/etc/PHP/PHP ini: ro
-/etc/localtime:/etc/localtime: ro
Working_dir: ${APP_CODE_PATH_CONTAINER}/Project - carsafe - 201805
Depends_on:
- mysql
Networks:
- code - network
Mysql:
Build:/mysql
Restart: always
Ports:
- "3306-3306
"Volumes,
- ${APP_MYSQL_PATH}/data/,/var/lib/mysql
- ${APP_MYSQL_PATH}/logs:/var/log/mysql
- ${APP_MYSQL_PATH}/my. CNF:/etc/mysql/my CNF
- ${APP_MYSQL_PATH}/conf. D/,/etc/mysql/conf. D
-/etc/localtime:/etc/localtime: ro
Environment:
- MYSQL_ROOT_PASSWORD=root
Networks:
- code - network
Redis:
Build:/redis
Restart: always
Ports:
- "6379-6379
"Volumes,
- ${APP_REDIS_PATH}/data/:/data/
- ${APP_REDIS_PATH}/logs:/var/log/redis
-/etc/localtime:/etc/localtime: ro
Environment:
- ALLOW_EMPTY_PASSWORD=yes
Entrypoint: redis - server - appendonly yes
Networks:
- code - network
Networks:
Code - network:
Driver: bridge,
Nginx. Conf content
The user WWW - data;
Worker_processes auto;
Pid/run/nginx. Pid;
Events {
Worker_connections 768;
# multi_accept on;
}
HTTP {
# #
# Basic Settings
# #
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
Types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
Include/etc/nginx/mime types;
default_type application/octet-stream;
# #
# SSL Settings
# #
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
# #
# Logging Settings
# #
Access_log/var/log/nginx/access. The log.
Error_log/var/log/nginx/error log.
# #
# Gzip Settings
# #
gzip on;
Gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/CSS application/json application/javascript text/XML application/XML + RSS application/XML text/javascript.
# #
# Virtual Host Configs
# #
Include/etc/nginx/conf. D/*. Conf.
Include/etc/nginx/sites - enabled/*;
}
# mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth. PHP;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" UIDPLUS ";"
#
# server {
# listen localhost: 110;
# protocol pop3;
# proxy on;
#}
#
# server {
# listen localhost: 143;
# protocol imap;
# proxy on;
#}
#}
Nginx/conf. D content
Server {
listen 80;
Server_name test.carsafe.com;
Root/usr/share/nginx/HTML/Project - carsafe - 201805/public;
Add_header X - Frame - the Options "SAMEORIGIN";
Add_header X-ray XSS - Protection "1; Mode=block ";
Add_header X - the content-type - Options "nosniff";
index index.html index.htm index.php;
Charset utf-8;
The location/{
Try_files $$uri uri//index. PHP? $query_string;
}
Location=/favicon. Ico {access_log off; Log_not_found off; }
Location=/robots. TXT {access_log off; Log_not_found off; }
404/error_page index. PHP;
The location ~ \. PHP ${
Fastcgi_pass PHP: 9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
Fastcgi_buffer_size 16 k;
Fastcgi_buffers 4 16 k;
}
The location ~/\. (? ! Well - known). * {
deny all;
}
}
Example:
$data [
=https://bbs.csdn.net/topics/"Username"=& gt; "18622221320",
"Password"=& gt; "1234",
"Scope"=& gt; ", "
"Client_id=& gt;" "2",
"Client_secret"=& gt; "BHMgjY1YApfhG9sHSY4fgdIZjR0jYDVaWH2vkAoe,"
nullnullnullnullnullnullnullnullnullnullnull