大家好我是nginx的新手,我非常需要帮助我正在配置基于Digital Oceans guide的设置。我知道我弄乱了某些地方,我读过无数文档,也许我错过了一些东西。我相信这是我的根目录指向或我如何设置它。这是我的代码:
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name www.xxx.com;
include snippets/ssl-xxx.com.conf;
include snippets/ssl-params.conf;
root /home/sammy/myproject/profiles/templates;
index index.html index.htm home home.html;
root /var/www/html;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/sammy/expo/static/;
}
location /static/admin/ {
#default_type text/javascript;
alias /home/sammy/static/static-only/admin/;
}
location /media/ {
alias /home/sammy/static/media/;
}
location / {
include proxy_params;
proxy_pass http://unix:/tmp/myproject.sock;
}
}
非常感谢任何和所有帮助。提前谢谢。