This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: | |
cd /etc/yum.repos.d/ | |
vim nginx.repo | |
填写如下内容: | |
[nginx] | |
name=nginx repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import make_response | |
from reportlab.pdfgen import canvas | |
# ... | |
@app.route('/pdf') | |
def pdf(): | |
import cStringIO | |
output = cStringIO.StringIO() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frontend | |
server { | |
listen 80; | |
server_name yii2.lo; | |
server_tokens off; | |
client_max_body_size 128M; | |
charset utf-8; | |
access_log /var/log/nginx/yii2-access.log main buffer=50k; |