0

I have two questions for you.

  1. I added to my serwer two domains. Now I see that I can login to ftp write both domains name. How set only one domain to works that server name ?

  2. How give access alias phpmyadmin only domain which is serwer name ?

  • Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers. Missing INformations: Webserver, FTP used, Logs, and detailed issues as also already tested or failed configuration attemps. End-User question are offtopic – djdomi Jul 26 '22 at 13:06

2 Answers2

1
  1. FTP does not have a concept of virtual hosts. Therefore FTP server is always reachable by IP address, with all domain names that map to the IP address.

Therefore you need to get a separate IP address for the other domain name, and then configure FTP daemon to only listen on a single IP address.

  1. You configure a virtual host for PHPMyAdmin in your web server configuration.
Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
0

Most protocols/services are not hostname aware.

That means that the application, simplified, does a hostname to IP-address name resolution and then attempts to make a connection to the IPv4 or IPv6 address that gets returned and the original hostname used will be lost. On that IP-address either a service is listening or not.

So to really offer different services for different host- and/or domain names, each host/domain needs it's own IP-address and you configure the service to listen to one IP-address and not to another.

That is (especially with limited IPv4 addresses) not always possible, so there are workarounds:

HTTP is a protocol that requires that, once the client is successfully connected to the IP-address of the web server, the client includes a Host: header in each request, with the original hostname.

The TLS SNI extension similarly adds the original hostname to the request. That is what allows the web server to be configured to show different a different certificate and/or content (or no content) based on the original hostname used by the site visitor.

That is typically called Name Based Virtual hosting and allows a server administrator to enable different content (such as a PHPMyAdmin install) for different sites.

Although such a similar extension also exists for the FTP protocol it was a very recent addition that only came when FTP was already an old and widely implemented protocol and never really picked up.
So most FTP clients don't transmit to the server which hostname they're requesting and even when they do, most FTP servers lack the capability do something useful with that...

Also see: How do I make protocol foo hostname-aware?

Rob
  • 1,137
  • 7
  • Nicely written, but it does not address the question directly only at the point, that its to general... imho. why dont you request more Information? – djdomi Jul 26 '22 at 13:08