我已经在我的服务器上安装了 iRedMail,它可以完美地管理我的电子邮件。我想将此服务器也用作网站服务器。我进入了nginx配置/etc/nginx/sites-enabled/
00-default-ssl.conf 00-default.conf
当我添加www.mywebsite.com.conf
它似乎没有被渲染。
mywebsite 没有部署,我的 nginx 配置很简单。
它与 iRedAdmin 配置有关吗?因为文件00-default-ssl.conf
使用模板。nginx 中的模板是否覆盖了 conf 文件?
我的会议上有什么遗漏吗?
提前致谢 !
内容 00-default-ssl.conf
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mail.mywebsite.com;
root /var/www/html/iredmail;
index index.php index.html;
include /etc/nginx/templates/misc.tmpl;
include /etc/nginx/templates/ssl.tmpl;
include /etc/nginx/templates/iredadmin.tmpl;
include /etc/nginx/templates/roundcube.tmpl;
include /etc/nginx/templates/sogo.tmpl;
include /etc/nginx/templates/netdata.tmpl;
include /etc/nginx/templates/php-catchall.tmpl;
include /etc/nginx/templates/stub_status.tmpl;
}
那是我对我的 conf www.mywebsite.conf
:
server {
root /var/www/html/mywebsite.com/public/;
index index.html ;
server_name site.mywebsite.com;
location / {
alias /var/www/blog/html/public;
index index.html;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/site.mywebsite.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/site.mywebsite.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}