I have a raspberry running ubuntu which has Nginx running two sites on it. I configured TLS on of those sites with certbot. (wordpress and dokuwiki)
Both of these sites work without any issues.
I wanted to host a 3rd site from here a Mantis website for bug tracking. I made the nginx basic config installed the site... the site is up and running it works as it should. But when I try to provision TLS with certbot it breaks the whole thing; all the elements and gui breaks.
Has anyone ran into a problem like this before? If i revert the .conf changes that certbot made it revert to normal but without ssl.
Here is the original before certbot touched it:
server {
listen 80;
server_name example.eu www.example.eu;
access_log /var/log/nginx/mantis-access.log;
error_log /var/log/nginx/mantis-error.log;
error_page 404 =200 /error.html;
root /var/www/example/mantis;
index index.php;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
include fastcgi_params;
}
}
AND here it is after certbot went through its script:
server {
server_name example.eu www.example.eu;
access_log /var/log/nginx/mantis-access.log;
error_log /var/log/nginx/mantis-error.log;
error_page 404 =200 /error.html;
root /var/www/example.eu/mantis;
index index.php;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
include fastcgi_params;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.eu/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example/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
}
server {
if ($host = www.example.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = example.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name example.eu www.example.eu;
return 404; # managed by Certbot
}
Any ideas or pointers would be much appreeciated.
It looks like Mantis was installed via HTTP, and continues to work that way even when you use HTTPS.
After installing SSL, try changing the URL to HTTPS in the
config/config_inc.php
file in the site folder, on the$g_path
variable.