Skip to content

Commit 2415f30

Browse files
author
张俊杰
committed
jwt拓展支持
1 parent 6524d53 commit 2415f30

File tree

5 files changed

+88
-6
lines changed

5 files changed

+88
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ aof_base_size|AOF上次启动和重写的尺寸(单位:字节)
147147
```
148148
appendonly yes
149149
appendfilename "appendonly-${port}.aof"
150-
appendfsync everysec
150+
**appendfsync** everysec
151151
dir /bigdiskpath
152152
no-appendfsync-on-rewrite yes
153153

nginx/conf.d/blog.conf

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
server {
22
listen 80;
33

4-
server_name cqzjj.name;
4+
server_name www.phpzjj.name;
55

66
index index.html index.htm index.php;
77
root /www/blog/public/;
@@ -40,6 +40,48 @@ server {
4040
}
4141

4242

43+
server
44+
{
45+
46+
listen 443 ssl;
47+
server_name www.phpzjj.name;
48+
49+
ssl_certificate /www/ssl/www.phpzjj.com.pem;
50+
ssl_certificate_key /www/ssl/www.phpzjj.com-key.pem;
51+
ssl_session_timeout 5m;
52+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
53+
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置
54+
ssl_prefer_server_ciphers on;
55+
56+
index index.html index.htm index.php;
57+
root /www/blog/public/;
58+
59+
#if ($http_user_agent ~* "Baiduspider")
60+
# {
61+
# rewrite ^(.*)$ http://$host$1 permanent;
62+
# }
63+
64+
location /
65+
66+
{
67+
68+
try_files $uri $uri/
69+
/index.php$is_args$query_string;
70+
}
71+
72+
location ~ \.php(.*)$ {
73+
fastcgi_pass php7:9000;
74+
fastcgi_index index.php;
75+
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
76+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
77+
fastcgi_param PATH_INFO $fastcgi_path_info;
78+
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
79+
include fastcgi_params;
80+
}
81+
82+
}
83+
84+
4385
server {
4486

4587
listen 80;

php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apt-get install -y \
2121
libgmp-dev\
2222
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
2323
&& docker-php-ext-configure gmp \
24-
&& docker-php-ext-install -j$(nproc) gmp \
24+
&& docker-php-ext-install -j$(nproc) gmp \
2525
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
2626
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
2727
&& docker-php-ext-install -j$(nproc) gd

php7/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ RUN apt-get install -y \
1616
libxml2-dev \
1717
libmagickwand-dev \
1818
libmagickcore-dev \
19+
libgmp-dev \
20+
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
21+
&& docker-php-ext-configure gmp \
22+
&& docker-php-ext-install -j$(nproc) gmp \
1923
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
2024
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
2125
&& docker-php-ext-install -j$(nproc) gd
@@ -29,7 +33,7 @@ RUN curl 'http://pecl.php.net/get/redis-4.0.2.tgz' -o redis.tgz \
2933
&& pecl install swoole.tgz \
3034
&& curl 'http://pecl.php.net/get/imagick-3.4.3.tgz' -o imagick.tgz\
3135
&& pecl install imagick.tgz \
32-
&& docker-php-ext-enable imagick redis xdebug swoole
36+
&& docker-php-ext-enable imagick redis xdebug swoole gmp
3337

3438
RUN docker-php-ext-install mysqli pdo_mysql opcache\
3539
&& curl -sS https://getcomposer.org/installer | php \
@@ -58,8 +62,11 @@ RUN curl 'http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2' -o scws.tar.bz2
5862
#pcntl 安装
5963

6064
RUN cd /usr/src/ \
61-
&& tar -xvf php.tar.xz \
62-
&& cd /usr/src/php-7.1.19/ext/pcntl \
65+
&& mkdir /usr/src/php \
66+
&& tar -xvf php.tar.xz -C ./php\
67+
&& cd /usr/src/php \
68+
&& mv * php7 \
69+
&& cd /usr/src/php/php7/ext/pcntl \
6370
&& phpize \
6471
&& ./configure --with-php-config=/usr/local/bin/php-config \
6572
&& make && make install \

www_test/1.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: zhangjunjie
5+
* Date: 2019/2/18
6+
* Time: 6:02 PM
7+
*/
8+
9+
10+
$start = convert(memory_get_usage(true));
11+
12+
echo $start.PHP_EOL;
13+
14+
range(1, 1000000);
15+
16+
$array = array();
17+
18+
/*for($i = 0; $i<1000000; $i++) {
19+
$array[$i] = null;
20+
}*/
21+
22+
$end = convert(memory_get_usage(true));
23+
24+
echo $end.PHP_EOL;
25+
26+
27+
28+
29+
function convert($size)
30+
{
31+
$unit=array('b','kb','mb','gb','tb','pb');
32+
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
33+
}

0 commit comments

Comments
 (0)