I want to run an instance of redmine on port 5020 of my VPS
This is my nginx site-available config:
server {
listen 5020 ssl default_server;
listen [::]:5020 ssl default_server;
include snippets/ssl-params.conf;
include snippets/self-signed.conf;
root /opt/redmine/public;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
server_name my.great.server ;
return 301 https://$server_name:5020$request_uri;
access_log /var/log/nginx/your_domain.com.access.log;
error_log /var/log/nginx/your_domain.com.error.log;
passenger_enabled on;
passenger_min_instances 1;
client_max_body_size 10m;
}
NGINX accepts this.
But visiting https://my.great.server:5020 returns:
An error occurred during a connection to my.great.server:5020. SSL received a record that exceeded the maximum permissible length.
Redmine is working on that port without https, though, using this config [edit: i meant, that after i replace the cnfig for https with the following config for http, it will work]:
server {
# listen 5020;
listen 5020 default_server;
listen [::]:5020 default_server;
root /opt/redmine/public;
server_name my.great.server:5020 ;
access_log /var/log/nginx/your_domain.com.access.log;
error_log /var/log/nginx/your_domain.com.error.log;
passenger_enabled on;
passenger_min_instances 1;
client_max_body_size 10m;
}
The snippet files all exist and correct, because tehy work on port 443. I have enabled port 5020 for tcp.
Visiting this question did not help me.
This question says i need to add ssl after the port number in the line that begins with listen, i.e. 5020, but that is already added.
Please help me, thank you.
PS: Should the solution require the redmine link to be: https://my.great.server/some/subfolder, it is 100% ok with me.