In a web browser, an http request is sent to https port. This means the browser sends the request over HTTPS, but the server responds with a normal HTTP response. If you see this message in your browser’s window, it means that the website is not using HTTPS and your computer will send your data over insecure channels.
The the plain http request was sent to https port nginx ingress is a problem that can be fixed by using the nginx ingress.
Setting up a server on any operating system may be difficult, particularly when using security protocols like SSL. You may get a lot of problems if you put up a server configuration to handle HTTP and HTTPS requests improperly.
The “paint HTTP request was delivered to HTTPS port” error is one such Nginx error. When you don’t activate SSL in your Nginx settings, you’ll see this error. When a client attempts to access http://site.com (or HTTP port 80), the server will automatically try to utilize HTTPS, resulting in this error.
If a client attempts to connect to https://site.com, on the other hand, the site will function normally since the URL securely connects to the server.
Also see: How can I check the status of Nginx?
The solution to this problem is very straightforward. When an initial request connects over plain HTTP to port 80, Nginx expects SSL to be used, allowing SSL to remove the problem. To allow (or deactivate) SSH access, just make a change to your Nginx settings.
For reference, here’s how Nginx’s default configuration file looks. You may use this configuration to fix the problem if you don’t want to modify your current configuration file.
server name example.com; server port 80; server port 80; server port 80; server port 80; server_ return 301; www.example.com https://www.example.com $request uri; $request uri; $request uri; $request uri server /var/www/html/example.com/; index index.php index.html index.htm; server name example.com www.example.com; root /var/www/html/example.com/; index index.php index.html index.htm; # access log /var/log/nginx/example.com/example.com access log; error log /var/log/nginx/example.com/example.com error log error; # charset koi8-r; charset koi8-r; charset koi8-r; charset koi8-r; charset koi8- ssl on; ssl certificate /etc/ssl/certs/example com cert chain.crt; ssl certificate key /etc/ssl/private/example com.key; include /etc/nginx/ssl.d/ssl.conf; location / $uri $uri/ /index.php?$query string; $uri $uri/ /index.php?$query string; $uri $uri/ /index.php? /50x.html; location = /50x.html; error page 500 502 503 504 /var/www/html/example.com/root; # #location.php # #proxy the PHP scripts to Apache listening on 127.0.0.1:80 $ proxy pass http://127.0.0.1; # # pass the PHP scripts to the FastCGI server at 127.0.0.1:9000 # location.php $ root /var/www/html/example.com/; fastcgi pass 127.0.0.1:9001; #fastcgi pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi index index.php; fastcgi param unix:/var/run/php-fpm/php-fpm.sock; fastcgi param unix:/var/run/php- SCRIPT FILENAME include fastcgi params; include /etc/nginx/fastcgi params; include $document root$fastcgi script name; If Apache’s document root # agrees with nginx’s, block access to.htaccess files. # #location /.ht # disallow all;
Simply access your configuration file and search for the ‘ssl on;’ SSL toggle. Simply remove the comment from the line holding the SSH command you wish to use (enabling or disabling) and save the file.
After that, just run the command below to restart the Nginx server, and you’re ready to go.
sudo systemctl nginx restart
If you’re having trouble using the Apigee API, you may look into the potential reasons and remedies in this tutorial.
Also see: 3 Fixes for Linux No Space Left on Device
When he’s not writing/editing/shooting/hosting all things tech, he streams himself racing virtual automobiles. Yadullah may be reached at [email protected], or you can follow him on Instagram or Twitter.
The the plain http request was sent to https port cloudflare is a problem that can occur when using an HTTP proxy server. This article will tell you how to fix the issue.
- elasticsearch the plain http request was sent to https port
- 400 the plain http request was sent to https port postman
- haproxy the plain http request was sent to https port
- the plain http request was sent to https port apache
- the plain http request was sent to https port aws alb