Jump to content

ftp on a subdomain?

Go to solution Solved by Nineballo,

A friend solved this for me... all it took was an A record with the ftp:// prefix.

Is it possible to host an ftp server on a subdomain such as ftp.example.com, either using some weird Nginx config or something else.

 

I'm hosting the ftp server on Ubuntu server 18 with vsftpd

 

i tried doing a reverse proxy with nginx and ended up with the whole ftp not supported thing...

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/
Share on other sites

Link to post
Share on other sites

nginx dosent like ftp

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049704
Share on other sites

Link to post
Share on other sites

This was the config I tried, its just a modified version of the one I use for http.

 


server {
  listen 80;
  listen 443;
  server_name ftp.nineball.wtf;
  location / { # Or / if hosting at the root.
      proxy_pass ftp://0.0.0.0/;
      proxy_set_header Host $host;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection upgrade;
      proxy_set_header Accept-Encoding gzip;
  }
}

It results in this error when restarting nginx

Nov 16 05:20:48 Code-server nginx[12196]: nginx: [emerg] invalid URL prefix in /etc/nginx/sites-enabled/ftp.conf:6

 

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049708
Share on other sites

Link to post
Share on other sites

4 minutes ago, Nineballo said:

This was the config I tried, its just a modified version of the one I use for http.

 


server {
  listen 80;
  listen 443;
  server_name ftp.nineball.wtf;
  location / { # Or / if hosting at the root.
      proxy_pass ftp://0.0.0.0/;
      proxy_set_header Host $host;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection upgrade;
      proxy_set_header Accept-Encoding gzip;
  }
}

It results in this error when restarting nginx


Nov 16 05:20:48 Code-server nginx[12196]: nginx: [emerg] invalid URL prefix in /etc/nginx/sites-enabled/ftp.conf:6

 

I think someone has a proxy that will let you pass ftp traffic. Did you try that?

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049712
Share on other sites

Link to post
Share on other sites

Nope but I will right now, was hoping for an nginx solution or even a dns solution (if that's a thing).

 

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049717
Share on other sites

Link to post
Share on other sites

Yea i cant find anything made within the last 5 years and everything else just dosent work...

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049741
Share on other sites

Link to post
Share on other sites

50 minutes ago, Nineballo said:

Nope but I will right now, was hoping for an nginx solution or even a dns solution (if that's a thing).

 

dns can do it, but would point to anouther ip, do you have multiple ips to use?

 

I found this that might work https://github.com/yaoweibin/nginx_tcp_proxy_module

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049773
Share on other sites

Link to post
Share on other sites

i have two but i wanna keep everything on that main server. I was experimenting with the proxy thing but i couldn't figure it out. I was experimenting with the built in proxy tcp thingy.

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049780
Share on other sites

Link to post
Share on other sites

6 minutes ago, Nineballo said:

i have two but i wanna keep everything on that main server. I was experimenting with the proxy thing but i couldn't figure it out. I was experimenting with the built in proxy tcp thingy.

If you have 2, you can point both to the server with the router and port forwarding and nat. What is your network setup?

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049791
Share on other sites

Link to post
Share on other sites

a vps and and a small computer behind my home router

I run everything through cloudflare

 

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049793
Share on other sites

Link to post
Share on other sites

Also my networking knowledge is awful so heads up you might have to explain things a little...

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13049797
Share on other sites

Link to post
Share on other sites

A friend solved this for me... all it took was an A record with the ftp:// prefix.

Spoiler

CPU: 5800x

GPU: 1070ti

HDD: Seagate 3TB
SSD: 1TB WD NVME

RAM: 32GB ddr4 3200

HEADPHONES: DT990 pro 250ohm limited edition black

MONITER: BenQ xl2536

CASE: s340 elite hyperbeast

KEYBOARD: nk87- zilent switches

MOUSE: G403 Hero

 

Link to comment
https://linustechtips.com/topic/1124071-ftp-on-a-subdomain/#findComment-13051620
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×