Question
How to access port 8000 on https
I’m running a docker container as shown
docker run –rm -it -p “8000:8000” -v “/home/scott/stellar:/opt/stellar” –name stellar stellar/quickstart –testnet
i can access it on my VM using
http://tokensaletest.southcentralus.cloudapp.azure.com:8000/
but i want to access it via https like
https://tokensaletest.southcentralus.cloudapp.azure.com:8000/
please how do i do that. here’s my Nginx config
upstream gogs {
server tokensaletest.southcentralus.cloudapp.azure.com:8000;
}
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name tokensaletest.southcentralus.cloudapp.azure.com;
#Change ssl_certificate and ssl_certificate_key to point towards your SSL Certificate and your SSL key, respectively.
ssl_certificate /etc/nginx/ssl/sureremittokensecurewebcert.pem;
ssl_certificate_key /etc/nginx/ssl/sureremittokensecurewebkey.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location \ {
proxy_pass https://gogs;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php7.0-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
#fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×