Hey, so I am running an Ubuntu 16.04 server with vsftpd installed according to this tutorial. Everything works fine and I can upload files using an ftp client.
However I would like to use one of my domains instead of the IP in the ftp client to connect to the server.
I am using the digital ocean name server with basically all default settings. My domain points to the server IP.
On my server I am running docker and an nginx proxy. This proxy redirects the incoming traffic to an upstream e.g. a nodejs server (also docker).
The nginx config is the following:
server {
server_name ~. ;
listen 80;
listen [::]:80;
# config for .well-known
include /etc/nginx/includes/letsencrypt.conf;
location / {
return 301 https://$host$uri;
}
}
# Redirect all www to non-www
#
server {
listen 80;
listen [::]:80;
server_name "~^www\.(.*)$" ;
return 301 https://$1$request_uri;
}
# Redirect https www to non-www
#
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.domain.com;
ssl_certificate /etc/letsencrypt/live/www.domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.domain.com/privkey.pem;
return 301 https://domain.com$request_uri;
}
server {
server_name domain.com;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
isten 443 ssl http2;
listen [::]:443 ssl http2;
# access_log
access_log /var/log/nginx/access.log;
# proxy_pass config
location / {
# include proxy presets
include /etc/nginx/includes/proxy.conf;
proxy_pass http://upstream$uri;
}
# general ssl parameters
include /etc/nginx/includes/ssl-params-with-preload.conf;
root /var/www/html;
}
I am using the suggested FTP with SSL method in my ftp client.
Any idea what I am doing wrong? Thanks.
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.
Why are you using FTP instead of SFTP?
Hey There. Thanks for posting here, this was not going to be easy to troubleshoot over social media. As we’ve already ruled out a service in front of your droplet like CloudFlare lets dig into this.
You mentioned that you can reach your droplet’s FTP service by using the IP address but not when using your domain. Can you share the domain name you’re having trouble with? If you’re not comfortable sharing it publicly you can include it in an email to me (ryan[at]digitalocean.com)