This article contains instructions on how to change the default ports for HTTP (80/TCP) and HTTPS (443/TCP) access to the platform.
- Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
- Check the current port settings in /opt/ispsystem/vm/docker-compose.yaml — published parameters for the input container:
cat /opt/ispsystem/vm/docker-compose.yaml
Example outputinput: container_name: input image: docker-registry.ispsystem.com/team/vm/input/alma:2.0.9 ... ports: - published: 80 target: 80 - published: 443 target: 443 ...
- Change the port values:
sed -i 's%- published: \"old_port\"%- published: \"new_port\"%g' /opt/ispsystem/vm/docker-compose.yaml
Comments to the commandExample for changing the port from 80/TCP to 8080/TCPsed -i 's%- published: \"80\"%- published: \"8080\"%g' /opt/ispsystem/vm/docker-compose.yaml
- Check that the port values have been changed: After the change, the settings should look like this:
cat /opt/ispsystem/vm/docker-compose.yaml
input: container_name: input image: docker-registry.ispsystem.com/team/vm/input/alma:2.0.9 ... ports: - published: <новый HTTP port> target: 80 - published: <новый HTTPS port> target: 443 ...
- Recreate the input container:
docker stop vm_input_1
docker rm -f vm_input_1
vm start
- If you have only changed the HTTP port settings, disable the automatic redirect from HTTP to HTTPS in the web server settings: These changes will be reset the next time the input container is restarted. For example, when the platform is updated or reloaded.
- Enter the input container:
docker exec -it input bash
- Change the web server configuration:
sed 's%return 301 https://$host$request_uri;%return 301 https://$host:4433$request_uri;%g' /etc/nginx/templates/secure.conf.ctmpl
- Stop the web server:
/etc/init.d/nginx stop
- Back up the secure.conf configuration file:
mv /etc/nginx/conf.d/secure.conf /etc/nginx/conf.d/secure.conf.bak
- Start the web server:
/etc/init.d/nginx start
- Exit the container:
exit
- Enter the input container:
- Check if the platform's web interface opens using the new ports.