安装宝塔界面

 yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh

宝塔管理界面安装 LAMP环境

Apache=2.4
PHP=5.6
MySQL=5.5
redis   默认版本

配值apache  虚拟目录

#后端服务器虚拟主机
Listen 881
<VirtualHost *:881>ServerAdmin webmaster@example.comDocumentRoot "/www/wwwroot/services"ServerName 1ba914c3.cdn.bt.netServerAlias cdn.bt.net 192.168.217.130errorDocument 404 /404.htmlErrorLog "/www/wwwlogs/cdn.bt.net-error_log"CustomLog "/www/wwwlogs/cdn.bt.net-access_log" combined#DENY FILES<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>Order allow,denyDeny from all</Files>#PHP<FilesMatch \.php$>SetHandler "proxy:unix:/tmp/php-cgi-56.sock|fcgi://localhost"</FilesMatch>#PATH<Directory "/www/wwwroot/services">SetOutputFilter DEFLATEOptions FollowSymLinksAllowOverride AllRequire all grantedDirectoryIndex index.php index.html index.htm default.php default.html default.htm</Directory>

 正则规则

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]

  

 前端虚拟主目录

#前端 虚拟主目录
Listen 882
<VirtualHost *:882>ServerAdmin webmaster@example.comDocumentRoot "/www/wwwroot/web"ServerName a6e74644.www.bt.netServerAlias www.bt.neterrorDocument 404 /404.htmlErrorLog "/www/wwwlogs/www.bt.net-error_log"CustomLog "/www/wwwlogs/www.bt.net-access_log" combined#DENY FILES<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>Order allow,denyDeny from all</Files>#PHP<FilesMatch \.php$>SetHandler "proxy:unix:/tmp/php-cgi-56.sock|fcgi://localhost"</FilesMatch>#PATH<Directory "/www/wwwroot/web">SetOutputFilter DEFLATEOptions FollowSymLinksAllowOverride AllRequire all grantedDirectoryIndex index.php index.html index.htm default.php default.html default.htm</Directory>

通过宝塔管理界面 创建数据库

通过宝塔管理界面 配置php  Session 使用 Redis 或者  Memcache  缓存回话 session  php.ini配置详情

[PHP]
engine = On
short_open_tag = On
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
disable_functions = passthru,system,chroot,chgrp,chown,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 120
max_input_time = 120
memory_limit = 1024M
error_reporting = 120
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 1024M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
cgi.fix_pathinfo = 1
file_uploads = On
upload_max_filesize = 1024M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
date.timezone = PRC
[filter]
[iconv]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = redis
session.save_path = "tcp://127.0.0.1:6379"
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatibility_mode = Off
mssql.secure_connection = Off
[Assertion]
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[mcrypt]
[dba]
[opcache]
[curl]
curl.cainfo =/etc/pki/tls/certs/ca-bundle.crt
[openssl]
openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.6.so
[Zend Opcache]
zend_extension=/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/opcache.so
opcache.enable = 1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
[Zend ZendGuard Loader]
zend_extension=/usr/local/zend/php56/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
extension = /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/fileinfo.so
extension=memcache.so
[swoole]
extension = swoole.so
extension = /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/apcu.so
[ImageMagick]
extension = "imagick.so"
extension=/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/xsl.so
extension=memcached.so
[redis]
extension = /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/redis.so
extension=/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/ixed.lin
extension =  /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/readline.so
extension =  /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/bz2.so

php-fpm.conf 配置详情

[global]
pid = /www/server/php/56/var/run/php-fpm.pid
error_log = /www/server/php/56/var/log/php-fpm.log
log_level = notice
[www]
listen = /tmp/php-cgi-56.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = static
pm.status_path = /phpfpm_56_status
pm.max_children = 100
pm.start_servers = 60
pm.min_spare_servers = 20
pm.max_spare_servers = 100
request_terminate_timeout = 120
request_slowlog_timeout = 30
slowlog = var/log/slow.log

  

安装openresty

yum install yum-utils -y                                                           #安装yum 扩展工具
yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo  #加载openresty的yum源
yum install  -y openresty                                                          #安装openrestyweb程序
ln -sf /usr/local/openresty/nginx /usr/local/nginx                                 #建立软连接目录
ln -sf /usr/local/nginx/sbin/nginx  /usr/local/sbin/nginx                          #建立软连接nginx启动程序

配置openresty nginx 主配置 建立vhost虚拟目录

user                    www;
worker_processes        auto;
worker_rlimit_nofile    65535;
error_log               logs/error.log crit;
pid                     /var/run/nginx.pid;
# Worker config
events {worker_connections  1024;use                 epoll;multi_accept        on;
}
http {# Main settingssendfile                        on;tcp_nopush                      on;tcp_nodelay                     on;client_header_timeout           1m;client_body_timeout             1m;client_header_buffer_size       2k;client_body_buffer_size         256k;client_max_body_size            1024M;large_client_header_buffers     4   8k;send_timeout                    30;keepalive_timeout               60 60;reset_timedout_connection       on;server_tokens                   off;server_name_in_redirect         off;server_names_hash_max_size      512;server_names_hash_bucket_size   512;# Log formatlog_format  main    '$remote_addr - $remote_user [$time_local] $request ''"$status" $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';log_format  bytes   '$body_bytes_sent';#access_log          logs/access.log main;access_log off;# Mime settingsinclude             mime.types;default_type        application/octet-stream;# Compressiongzip                on;gzip_comp_level     9;gzip_min_length     512;gzip_buffers        8 64k;gzip_types          text/plain text/css text/javascript text/js text/xml application/json application/javascript application/x-javascript application/xml application/xml+rss application/x-font-ttf image/svg+xml font/opentype;gzip_proxied        any;gzip_disable        "MSIE [1-6]\.";# Proxy settingsproxy_redirect      off;proxy_set_header    Host            $host;proxy_set_header    X-Real-IP       $remote_addr;proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass_header   Set-Cookie;proxy_connect_timeout   90;proxy_send_timeout  90;proxy_read_timeout  90;proxy_buffers       32 4k;# Cloudflare https://www.cloudflare.com/ipsset_real_ip_from   103.21.244.0/22;set_real_ip_from   103.22.200.0/22;set_real_ip_from   103.31.4.0/22;set_real_ip_from   104.16.0.0/12;set_real_ip_from   108.162.192.0/18;set_real_ip_from   131.0.72.0/22;set_real_ip_from   141.101.64.0/18;set_real_ip_from   162.158.0.0/15;set_real_ip_from   172.64.0.0/13;set_real_ip_from   173.245.48.0/20;set_real_ip_from   188.114.96.0/20;set_real_ip_from   190.93.240.0/20;set_real_ip_from   197.234.240.0/22;set_real_ip_from   198.41.128.0/17;#set_real_ip_from   2400:cb00::/32;#set_real_ip_from   2606:4700::/32;#set_real_ip_from   2803:f800::/32;#set_real_ip_from   2405:b500::/32;#set_real_ip_from   2405:8100::/32;#set_real_ip_from   2c0f:f248::/32;#set_real_ip_from   2a06:98c0::/29;real_ip_header     CF-Connecting-IP;# SSL PCI Compliancessl_session_cache   shared:SSL:10m;ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;ssl_prefer_server_ciphers on;ssl_ciphers        "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";# Error pageserror_page          403          /error/403.html;error_page          404          /error/404.html;error_page          502 503 504  /error/50x.html;# Cache settingsproxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m;proxy_cache_key "$host$request_uri $cookie_user";proxy_temp_path  /var/cache/nginx/temp;proxy_ignore_headers Expires Cache-Control;proxy_cache_use_stale error timeout invalid_header http_502;proxy_cache_valid any 1d;# Cache bypassmap $http_cookie $no_cache {default 0;~SESS 1;~wordpress_logged_in 1;}# File cache settingsopen_file_cache          max=10000 inactive=30s;open_file_cache_valid    60s;open_file_cache_min_uses 2;open_file_cache_errors   off;add_header Access-Control-Allow-Origin *;add_header Access-Control-Allow-Headers X-Requested-With;add_header Access-Control-Allow-Methods GET,POST,OPTIONS;add_header 'Access-Control-Allow-Credentials' 'true';add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken';add_header PS 1;include            vhost/*.conf;
}

  xx.xxx.xx.conf

server {listen      80;server_name cdn.bt.net;error_log  logs/cd.bt.net.error.log error;location / {proxy_pass      http://127.0.0.1:881;location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {root           //www/wwwroot/services;access_log     logs/cdn.bt.net..log combined;access_log     logs/cdn.bt.net.bytes bytes;expires        max;try_files      $uri @fallback;}}location /error/ {return 404 ;}location @fallback {proxy_pass     http://127.0.0.1:881;}location ~ /\.ht    {return 404;}location ~ /\.svn/  {return 404;}location ~ /\.git/  {return 404;}location ~ /\.hg/   {return 404;}location ~ /\.bzr/  {return 404;}
}
server {listen      80;server_name www.bt.net;error_log  logs/www.bt.net.error.log error;location / {proxy_pass      http://127.0.0.1:882;location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ {root           //www/wwwroot/web;access_log     logs/www.bt.net.log combined;access_log     logs/www.bt.net.bytes bytes;expires        max;try_files      $uri @fallback;}}location /error/ {return 404;}location @fallback {proxy_pass     http://127.0.0.1:882;}location ~ /\.ht    {return 404;}location ~ /\.svn/  {return 404;}location ~ /\.git/  {return 404;}location ~ /\.hg/   {return 404;}location ~ /\.bzr/  {return 404;}
}

修改upload.php 文件 第6到第7行  注释掉

header('Access-Control-Allow-Origin:*');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
#修改支持 nginx配置跨域配置

  

 项目文件归属用户和组 都是www.www 拥有读写权限

转载于:https://www.cnblogs.com/Black-Hawk/articles/10630019.html

视频系统部署 kvs相关推荐

  1. 基于JAVA教学视频平台系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA教学视频平台系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA教学视频平台系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  2. 容联雷辉:视频系统由标清进入到移动高清时代

    在LiveVideoStack2019上海音视频技术大会前夕,LiveVideoStack采访了容联云通讯产品技术总监雷辉,畅谈了视频通讯过去十年的里程碑事件,以及企业通信在AI和5G下的机遇. 文 ...

  3. 基于JAVA糖果销售管理系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA糖果销售管理系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA糖果销售管理系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  4. 基于JAVA高铁在线购票系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA高铁在线购票系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA高铁在线购票系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  5. Python基于OpenCV的实时疲劳检测[源码&演示视频&部署教程]

    1.图片演示 2.视频演示 [项目分享]Python基于OpenCV的实时疲劳检测[源码&演示视频&部署教程]_哔哩哔哩_bilibili 3.检测方法 1)方法 与用于计算眨眼的传统 ...

  6. 基于JAVA高校多媒体设备运维管理系统服务端计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA高校多媒体设备运维管理系统服务端计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA高校多媒体设备运维管理系统服务端计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈 ...

  7. 系统部署在服务器,如何把系统部署在云服务器

    如何把系统部署在云服务器 内容精选 换一换 华为云帮助中心,为用户提供产品简介.价格说明.购买指南.用户指南.API参考.最佳实践.常见问题.视频帮助等技术文档,帮助您快速上手使用华为云服务. 华为云 ...

  8. 基于JAVA共享汽车管理系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA共享汽车管理系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA共享汽车管理系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

  9. 基于JAVA环巢湖区域旅游网站计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA环巢湖区域旅游网站计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA环巢湖区域旅游网站计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开 ...

最新文章

  1. 二叉排序树的相关操作
  2. 干货 | 《利用Python进行数据分析》资料开源下载
  3. 马云最新演讲:未来10年,人类将面临AI、IoT和区块链等三大技术巨大挑战!
  4. 数据库抽象层 PDO
  5. gogs mysql 报错_docker上对gogs二次开发
  6. spring-注入map集合
  7. [vue] 在vue事件中传入$event,使用e.target和e.currentTarget有什么区别?
  8. UI控件Telerik UI for WinForms发布R1 2019|附下载
  9. CSharpGL(49)试水OpenGL软实现
  10. SQLi LABS Less 17 报错注入
  11. [MySQL FAQ]系列 -- MySQL怎么有时候像是多进程,有时候却是多线程
  12. 排队论模型的monteCarlo法仿真
  13. mini139聊天软件
  14. 【SLAM学习笔记】8-ORB_SLAM3关键源码分析⑥ Optimizer(三)全局优化
  15. 11尺寸长宽 iphone_iPhone11屏幕尺寸
  16. “我 33岁,阿里程序员,税后年薪170万,不配征婚?”
  17. PADS-VX入门到精通实战项目讲解(上)—LOGIC部分-覃小刚-专题视频课程
  18. oracle flash_back oracle闪回技术详解,oracle flashback 闪回技术实例
  19. 定制纳米储氢材料NdNi4.8Sn0.2/CNTs纳米碳管复合储氢材料/膨胀石墨/LiBH4复合储氢材料
  20. 「SwiftUI」延迟执行代码

热门文章

  1. 生活中的法则II(转载)
  2. 虚函数、纯虚函数、虚继承、多继承
  3. 在word中粘贴的图片为什么显示不完整
  4. php twig扩展,Symfony2基础教程之添加Twig的Filter扩展
  5. 2021-11-08笔记本搜不到手机热点的解决
  6. IntelliJ IDEA中文注释字体更换最佳方法
  7. 刚开始创建maven工程时会出现plugins爆红的问题
  8. 人脸皮肤高清xyz贴图库分享
  9. 做一个前端网页送给女朋友~轮播图+纪念日
  10. 柔性作业车间调度问题 (FJSSP)