Can a single server be associated with multiple domains?
Yes. This would be done by pointing those domains at your web server via DNS.
If I own the "x.x.x.x" web server, can I make two separate sites on "x.x.x.x/one" and "x.x.x.x/two" and give them two different domains?
This depends on your web server software. You could certainly point both domains to your server, but it would then be up to the server software to distinguish which traffic was intended for which domain.
Some smaller web server projects do not support this kind of feature. However, larger projects often do. In the cases of Apache and Nginx, this support comes via Name-based virtual hosts and server blocks, respectively. Both of these projects also support Server Name Indication (SNI) for TLS (HTTPS) connections as well.
How will it handle internal links in the case (es.
Typically, you would set the full path to your
one folder as the document root in e.g. your virtual host or server block configuration (i.e. where the "main" domain starts). A page that referenced e.g.
example.com/foo/page.html would then be referencing e.g.
x.x.x.x/one/foo/page.html. If you wanted to use just e.g.
example.com/page.html, you would set your document root to the full path of
WordPress has its own methods of dealing with domains. In your example case, assuming you wanted WordPress to handle both domains, you would:
Specify two domains in DNS.
Create two e.g. virtual hosts (in Apache) corresponding to those domains.
Set each document root to point your WordPress installation.
Configure WordPress to service both those domains.
Otherwise, you would simply point one document root to your WordPress installation (and configure only one domain in WordPress) and point the other document root to your non-WordPress files.
For the explanation above, I assuming that you have your web server set up at
foo are directories below the default document root you have already set up for the server.
It's worth mentioning that DNS points only to IP addresses (e.g.
22.214.171.124) or, in the case of CNAME records, whole domains (e.g.
example.com). You cannot point DNS to e.g.
There are some Domain Providers that may offer web redirects (e.g. to
http://126.96.36.199/one), but these are not part of DNS. How requests for pages would be handled in this situation would (again) entirely depend on your server.
Minimal Apache Virtual Host Examples
ex. Regular Domains
# ServerAlias www.example1.com, *.example1.com
# ServerAlias www.example2.com, *.example2.com
# ServerAlias www.sub1.example.com, *.sub1.example.com
# ServerAlias www.sub2.example2.com, *.sub2.example.com