nginx erroneously redirecting to https

Piki nginx-forum at
Thu Oct 4 10:07:19 UTC 2012

I am running nginx+php-fpm on localhost for testing some stuff sites before
uploading to a live server (which I have done with nginx in the past), and
have run into the first issue which Google can't seem to help me with:

I have decided to try three different forum softwares. They are installed
under separate subdirectories within my web root (e.g.
/srv/www/localhost/html/{forum1,forum2,forum3}). On two of the forums,
however, whenver I try to use anything that requires a password, it switches
from http to https, and on one of the forums, attempts to continue using
port 80. On the forum that it attempts to use port 80, I get the following
error message:

----------code snippet----------
Secure Connection Failed
          An error occurred during a connection to localhost:80.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

  The page you are trying to view cannot be shown because the authenticity
of the received data could not be verified.
  Please contact the website owners to inform them of this problem.
Alternatively, use the command found in the help menu to report this broken
----------end code snippet----------

I do not have https or ssl configured within nginx or the vhost, nor any ssl

Here is the vhost config file:
----------code snippet----------
server {
        server_name localhost;
        listen 80;
        root /srv/www/localhost/html;
        index index.php index.html index.htm;
        ssi on;

        location ~ \.php$ {
                include /etc/nginx/fastcgi_params;
                fastcgi_index index.php;
----------end code snippet----------

This very same configuration has worked fine on a live (online) server (save
for the fact that I had to use a different server_name and root, for obvious
reasons), and has never before produced any issues with ssl or switching to
https, and I have used it with several other forums without it producing
this strange behavior.

In case it matters, the two forum softwares I am having issues with are
punbb and usebb. Punbb is the one that attempts https on port 80 and
produces the error. Usebb doesn't attempt port 80 (it allows the browser to
attempt port 443 as is default for https), which causes my browser to not be
able to connect to the server since it's not even configured for port 443.

The third forum I have installed (Vanilla) doesn't attempt to use 443.
However, since 2/3 of the forum softwares are doing this, I have to assume
that the issue is nginx, but I am a bit too stupid in the area of servers to
be able to troubleshoot the issue on my own, and Google seems to think that
I'm trying to use https instead of trying to avoid https (the latter is the

I would much appreciate some help.

(I apologize for being a bit sloppy with posting the code snippets, but it
seems that bbcode is disabled (at least the code tage is), which I guess I
should've expect when this is joined with a mailing list)

Posted at Nginx Forum:,231379,231379#msg-231379

More information about the nginx mailing list