Changing Nginx Ports
-
Edit the IBM Aspera Shares
nginx.config file.
/opt/aspera/shares/etc/nginx/nginx.conf.
-
Update the HTTP and HTTPS server blocks with your desired ports.
These are the default settings for the two server blocks:
Update the values of the listen and rewrite directives with the desired ports (for example, 9080 and 9443).server { listen 80; listen [::]:80; return 301 https://$host$request_uri; } server { listen 443; listen [::]:443; ssl on; [...] }
server { listen 9080; listen [::]:9080; return 301 https://$host:9443$request_uri; } server { listen 9443; listen [::]:9443; ssl on; [...] }
-
Update
passenger_pre_start
directive with the new port.
Update the/opt/aspera/shares/etc/nginx/conf.d/shares-pre-start.conf
passenger_pre_start
with your desired port. For example:passenger_pre_start https://example.com:9443/;
Note: In versions older than 1.8, thepassenger_pre_start
directive is in the main nginx.conf file. -
Reload the nginx.config file with the following
command:
# /opt/aspera/shares/sbin/nginx -s reload