Here's the thing, I have my server configured with a virtualhost mydomain.com but the DNS are not pointing yet to this server's IP address.
In other words, I have:
mydomain.com DNS pointing to server A
a server B with a mydomain.com virtualhost
I need to connect to server B pretending I'm connecting to mydomain.com.
Is it possible to test that with Paw?
It took me a while to figure it out, so here's a screenshot that may explain the solution better.
I'm trying to access the virtualhost mydomain.com on the server with IP address 0.0.0.0.
What you're trying to do is probably DNS spoofing, you need to connect to your "server B"'s IP address but with an HTTP header Host: mydomain.com.
See DNS Spoofing with Paw.
Related
When I use $server_addr in my nginX configuration, it returns "127.0.0.1", but my script needs to know the actual LAN IP of the hosting server for some conditional items. Is there anyway to find out actual LAN IP (such as "192.168.1.32") instead of "127.0.0.1" in nginX?
Is there any way to configure the nginx to forward http requests to a specific localhost port through an IP address and a resource name?
For example, http://1.2.3.4/8000 request should be forwarded to http://localhost:8000.
Thanks!
My webserver is Nginx. I want to hide my server IP address using Tor proxy so my server IP address will be hidden. What Nginx configuration can I use to do it?
I wonder if is it ok to host multiple sites on a server with one IP address?
I bought server on hetzner and I want to host 10 different websites of my clients. Eg. client1.com, client2.net, client3.org etc. I changed "A record" in all domains on IP address of my server. Is there any reasons to not do that? Or maybe I should buy additional IP address for each site?
Thank You.
Sure it is, your webserver will be able to filter requests to the correct site based on the incoming request's URL.
In Apache this is done by adding a new virtual host to your configuration.
I would like to know. When a domain example.com has an IP address: 41.72.111.222, would any of its subdomains (sub.example.com, mail.example.com etc) have the same IP address listed in the DNS records? Or does it work like this: A request is sent from the browser to the DNS server for sub.example.com. The DNS server returns the IP address for example.com, and the split/differentiation is made when the request for sub.example.com hits the example.com host server? So the host server basically know what to do with sub.example.com and not the DNS server?
It can kind of be a combination of both. Ultimately, though, the decisions are made based on what you set your DNS settings to be. Your host (or hosts) will then get whatever traffic you determined they should get in your DNS settings.
So for example...
You can set your DNS settings to take [anything].example.com and always direct that to your server. You would do this by adding a wildcard entry to your DNS subdomains. Wildcard entries use a * symbol to mean "anything". You would then need to configure your server to know what to do with all these different potential subdomains it could be receiving.
At the same time, you can set specific subdomains to go to other hosts. For example, if you wanted mail.example.com to go to some other webmail host, you would set up in your DNS the subdomain "mail" and have that traffic redirected to wherever you were hosting your webmail.