Answer the question
In order to leave comments, you need to log in
How to disable requests for a subdomain?
I have this configuration
server {
listen 80;
server_name hepka.click;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name hepka.click;
ssl on;
ssl_certificate /etc/letsencrypt/live/hepka.click-0001/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/hepka.click-0001/privkey.pem;
access_log /var/log/nginx/hclick.access.log;
error_log /var/log/nginx/hclick.error.log;
location / {
proxy_set_header X-Forwarder-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:1337;
proxy_redirect off;
}
}
Answer the question
In order to leave comments, you need to log in
Most likely your nginx config was taken as default. Create somewhere else 1 config and write
server {
listen 80 default_server;
server_name _;
return 403;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question