-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mqtt.com url is working on both http. Need to disable it #1651
Comments
Dear Team, Could you please help on this scenario as mentioned above. Thanks & Regards, |
Hi there. sorry for the delayed reply. And I think this issue seems to be related to configuring nginx. To disable HTTP access, you can try the following:
server {
listen 80;
server_name mqtt.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name mqtt.com;
# SSL configuration
ssl_certificate /path/to/your/certificate.crt;
ssl_certificate_key /path/to/your/private.key;
# Other HTTPS configurations...
}
sudo systemctl restart nginx This will disable HTTP access by redirecting all HTTP requests to HTTPS. |
Hi Luke,
Thank you for the much needed support.
1. Redirection of the URL from http://mqtt.com to https://mqtt.com is
working fine.
2. but in this case, http://mqtt.com:18083 is also working , we need to
stop this URL. is there any procedure can we implement
Thanks & Regards,
Mohammed.Raheem
…On Wed, 15 May 2024 at 20:02, Luke Yu ***@***.***> wrote:
Hi there. sorry for the delayed reply.
And I think this issue seems to be related to configuring nginx. To
disable HTTP access, you can try the following:
1. Open your nginx configuration file (usually located at
/etc/nginx/nginx.conf or /etc/nginx/sites-available/default).
2. Add the following configuration to redirect HTTP to HTTPS:
server {
listen 80;
server_name mqtt.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name mqtt.com;
# SSL configuration
ssl_certificate /path/to/your/certificate.crt;
ssl_certificate_key /path/to/your/private.key;
# Other HTTPS configurations...
}
4. Save the changes and restart nginx:
sudo systemctl restart nginx
This will disable HTTP access by redirecting all HTTP requests to HTTPS.
—
Reply to this email directly, view it on GitHub
<#1651 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBUY27YEK4BHRQZGTDQISS3ZCOBH7AVCNFSM6AAAAABHXHAHOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSHEZTEMBUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Dear Team, Do i have changed the port , what will be the port of https in dashboard dashboard { Thanks & Regards, |
Let me confirm your request: You want to ensure that only https://mqtt.com:18083 is accessible and As far as I know, we cannot achieve the specific goal of blocking HTTP access while allowing HTTPS access. We can only redirect HTTP to HTTPS rather than blocking HTTP access to a specific port. Since you are using Nginx, you can ensure that HTTPS is correctly configured by EMQX and simply add the Nginx rules to redirect the HTTP to HTTPS as mentioned in my previous reply. Thanks & Regards, |
if there is no update, I will close this issue. thanks for your using. |
Dear Team,
As we have configured EMQX open source, we want to disable the URL on http which is http://mqtt.com:18083 as we are running the URL on https://mqtt.com with port forwarding which is working fine as i have configured in nginx.
Could you please guide me how to disable http://mqtt.com:18083
Thanks & Regards,
Raheem.Mohammed
The text was updated successfully, but these errors were encountered: