Reputation: 1
I know this was discussed many many times but no other topic fixed my problem. I am running nginx on ubuntu 18.04 and also I got the iRedMail installed on this machine. The iRedMail admin page and roundcube works brilliant but I am trying to create a 2nd virtual host to host a 2nd website but I am getting the 403 Forbidden error when launching the browser and pointing to the 2nd domain.
The xxx.xxx.com is working perfect. The xxx.com goes into 403 Forbidden page.
I'm a noob so please don't get mad if it's a stupid mistake.
00-default-ssl.conf of nginx
server {
listen 443;
server_name xxx.xxx.com;
root /var/www/html;
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;
ssl_certificate /etc/letsencrypt/live/xxx.xxx.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xxx.xxx.com/privkey.pem; # managed by Certbot
}
server {
listen 443;
server_name xxx.com;
root /var/www/site;
ssl_certificate /etc/letsencrypt/live/xxx.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xxx.com/privkey.pem; # managed by Certbot
}
Nginx's error log:
[error] 17970#17970: *1 directory index of "/var/www/site/" is forbidden, client: 80.31.xx.xxx, server: xxx.com, request: "GET /site/ HTTP/1.1", host: "xxx.com"
Upvotes: 0
Views: 1339