SELINUX=enforcing -> disabled
keyword: yum epel (oracle linux)
set enable
to 1
uWSGI 會開一個 socket 給 NGINX 使用,這樣兩者就可以互相溝通
uWSGI 會運作我們所撰寫的 python 檔案
enable port 80 & 443 for http(s)
Some configure on oracle cloud's panel is required.
// todo 土豆XDD
// iptable
install uwsgi by pip and then add uwsgi.ini.
ref for uwsgi.ini
add service file for uWSGI so that it can be started automatically on boot.
基本上就是改
ExecStartPre
跟ExecStart
systemctl commands:
check systemd log
Install nginx by yum.
first of all, edit settings.py, modify STATIC_URL
and STATIC_ROOT
.
static file will be generated under STATIC_ROOT
.
then, run the following command to generate static files:
then configure NGINX for url STATIC_URL
to provide static files.
詳細的看最下面
generate production built
https://certbot.eff.org/lets-encrypt/otherpip-nginx