From 78476575ad547f7616970404f11638fc338a85a1 Mon Sep 17 00:00:00 2001 From: IoTgod Date: Sun, 10 Mar 2019 14:26:28 +0800 Subject: [PATCH] add photo api --- server/cn/etc/nginx/nginx.conf | 63 ++++++++++++++++++- server/cn/home/www/api/pic/moe/index.php | 33 ++++++++++ server/cn/home/www/api/pic/photo/index.php | 39 ++++++++++++ .../www/img/usr/themes/photograph/footer.php | 1 + 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 server/cn/home/www/api/pic/moe/index.php create mode 100644 server/cn/home/www/api/pic/photo/index.php diff --git a/server/cn/etc/nginx/nginx.conf b/server/cn/etc/nginx/nginx.conf index 52a559c..2ec172a 100644 --- a/server/cn/etc/nginx/nginx.conf +++ b/server/cn/etc/nginx/nginx.conf @@ -1,5 +1,5 @@ -user apache; +user root; worker_processes 1; error_log /var/log/nginx/error.log warn; @@ -565,6 +565,67 @@ http { } } + server { + listen 443 ssl; + listen 80; + + server_name moe.api.yimian.xyz; #1 + + root /home/www/api/pic/moe; + + index index.php index.html; + client_max_body_size 1000M; + + ssl_certificate /etc/letsencrypt/live/moe.api.yimian.xyz/fullchain.pem; #2 + ssl_certificate_key /etc/letsencrypt/live/moe.api.yimian.xyz/privkey.pem; #3 + + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + error_page 404 = /404.php; + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + } + + + server { + listen 443 ssl; + listen 80; + + server_name photo.api.yimian.xyz; #1 + + root /home/www/api/pic/photo; + + index index.php index.html; + client_max_body_size 1000M; + + ssl_certificate /etc/letsencrypt/live/photo.api.yimian.xyz/fullchain.pem; #2 + ssl_certificate_key /etc/letsencrypt/live/photo.api.yimian.xyz/privkey.pem; #3 + + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + error_page 404 = /404.php; + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + } + server { listen 443 ssl; diff --git a/server/cn/home/www/api/pic/moe/index.php b/server/cn/home/www/api/pic/moe/index.php new file mode 100644 index 0000000..c682806 --- /dev/null +++ b/server/cn/home/www/api/pic/moe/index.php @@ -0,0 +1,33 @@ +

options->poweredby == 'y'): ?> + options->statCount == 'y'): $stat = statCount(); ?>