I know this is NGINX configuration but after i read some tutorials how to redirect website to https but is not work for me,
Requesting for your help how can I configured zammad in nginx to redirect to https I already installed comodo certificate and working but i need to type the https:// to load the website.
I want is I only type the domain then automatic load to https.
I already tried that config… and restart the nginx… still cant redirect to https
After you hit enter only loading then it will show that cant reach the server… but when i type the https it will connect and working properly
Yeah well your nginx does also needs to listen to port 443 (SSL) and have a config for that.
Here’s a link to our sample config file that you need to edit for your setup to work as expected, you can even insert/merge it with your existing configuration:
Sir @MrGeneration below is my nginx config but still cant redirect to https… and please advise if my ssl and other security (add_header) is only ok to zammad system…
thank you
Im using comodo certificate
server {
listen 80;
server_name domain.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
# replace 'localhost' with your fqdn if you want to use zammad from remote
server_name domain.com;
ssl on;
ssl_certificate /etc/nginx/ssl/certificate/cert.crt;
ssl_certificate_key /etc/nginx/ssl/certificate/key.key;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/nginx/ssl/certificate/cert.crt;
resolver 8.8.4.4 4.2.2.2 valid=300s;
resolver_timeout 10s;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
root /opt/zammad/public;
If I typed only is the domain name. Ex. zammad.domain.com the browser error is This site can,t be reached (Google Chorme) but i also try in other browsers same problem cant view the website,