nginx绑定freenom.com域名
生活随笔
收集整理的這篇文章主要介紹了
nginx绑定freenom.com域名
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
freenom.com設置:
?
hello.py
from flask import Flask app = Flask(__name__)@app.route('/') def hello_world():return 'Hello World!'if __name__ == '__main__':app.run(host="127.0.0.1",port=10071)python hello.py
nginx.conf
user root; worker_processes 2; error_log /etc/nginx/error.log; pid /etc/nginx/nginx.pid;events {worker_connections 1024; }http {#include /usr/local/nginx/conf/mime.types;include /etc/nginx/mime.types;default_type application/octet-stream;server {listen 80;server_name rawstone.ml;access_log /var/log/nginx/access.log;location / {proxy_pass http://127.0.0.1:10071;proxy_set_header Host $host:$server_port;proxy_set_header X-Real-IP $remote_addr;proxy_set_header REMOTE-HOST $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}location /static {root /home/appleyuchi;autoindex on;}location /media {root /home/appleyuchi;autoindex on; }}}# cp nginx.conf /etc/nginx/nginx.conf
# nginx -c /etc/nginx/nginx.conf
# nginx -s reload
總結
以上是生活随笔為你收集整理的nginx绑定freenom.com域名的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 个人银行账户包括 个人的银行账户有哪些
- 下一篇: ngrok布置外网访问环境