How do I assign dedicated ip address to subdirectory of domain? - .htaccess

I have domain hosted in dream host and my DNS provider is godaddy; now I have a custom application running under digital ocean which has a dedicated IP address.
Now consider my website is www.example.com and an ip address 14.181.162.226.
How do i point www.example.com/sub to 14.181.162.226

Related

Block website only to be accessible from cloudflare

I have my domains and DNS in Cloudflare but have multiple website in local & other hosting providers.
Currently i am using port forwarding in the hosting side and DNS in routed to public at Cloudflare.
My problem is some security settings i have defined in Cloudflare but the host is accessible with ip address, which by passes the Cloudflare settings.
How can i prevent this, how can i open the ports only to be accessible though Cloudflare DNS.
Regards
Ibbe
Website should be accessible only from dns. I want to accept only HTTPs
You should configure your DNS records in Cloudflare as a "Proxied", and in the "local & other hosting providers" you should allow access only from Cloudflare ip addresses. You can found the IP ranges here: https://www.cloudflare.com/ips/

Joomla showing IP instead of domain name

I am hosting my own website on a Proliant Rack server using Internet Information Services. I have configured everything; port forwards, IIS, and also my Content Management System, Joomla. I have also registered a domain, www.example.com (not the real domain obviously) with godaddy. I have also gone into proliant iLO and I have set the server FQDN to www.example.com. Finally, I forwarded the domain in godaddy to my public ip. However, when I enter in the URL (www.example.com) into a browser (outside of my network), it simply shows my IP address. My host file is as follows:
127.0.0.1 localhost
127.0.0.1 example.com
127.0.0.1 www.example.com
Any help is appreciated. Thanks!
You need to add a site and bind its host name to your domain. Otherwise, IIS doesn't know what the domain point to.

Can home internal DNS domain name same as external domain purchased on Godaddy and Namecheap?

I was wondering if someone can answer this question. I have already searched everywhere and couldn't find the answer anywhere, some of you might have already implemented this solution.
Here is what I have on my home network:
Software used: bind9 on Ubuntu 18.04
Home/Cloud DNS Server: xyz.com ( in a master / slave configuration : 2 servers using internal IP addresses 192.168.1.10 (master) , 192.168.1.11 (slave) )
On my namecheap account: I purchased a domain (xyz.com) , added A+ Dynamic DNS record pointing to my IP address provided by ISP, it is also updated using ddclient. I also have several subdomain under xyz.com such as : a11.xyz.com , a12.xyz.com, a13.xyz.com and so on.
On my primary DNS server at home:
└─<>──» nslookup xyz.com 0 < 10:25:03
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: xyz.com
Address: 192.168.1.10
But, if you look for a11.xyz.com - I want this to search locally first and then look externally for the DNS records on public DNS servers such as Google, Namecheap and others.
Server: 192.168.1.10
Address: 192.168.1.10#53
** server can't find a11.xyz.com: NXDOMAIN
Now, question is:
Q1. ) Is it possible to have such a configuration at home wherein home DNS server domain name is same as the one purchased at registrars like Namecheap and Godaddy ?
Q2. ) If internal domains are same as external domain names, can this mix be handled such that it will search locally first and then look outside for any records in the public dns servers.
Q3. ) if nslookup / dig response depends on the client configuration, Can the home DNS servers serve both bogus domains and real domains purchased ?
I haven't seen such a documentation on digital ocean or any other cloud providers.
Thanks again for the help.
I solved the problem by isolating internal domains from external domains. In the example above, if I have a domain on namecheap/godaddy as : xyz.com then same domain name CANNOT be used internally for home network since there will conflict in resolution so,
I created a domain specifically for internal device lookups : homelan.com and all devices inside the home network will have default domain homelan.com. This way, all subdomains of xyz.com can also resolve using forwarders as well as internal devices using homelan.com.
I was under the impression that if both external and internal domains are same, then bind will automatically resolve to external domains if it cannot find a record internally.

i can't access my website in other computer using domain name but can access using IP address

enter image description hereI can access my website in my computer using my ip address 192.168.X.X.
I can access my website in my computer using domain name local.firstsite.com
=======================================================================
I can access my website in other computer using my ip address 192.168.X.X
i can't access my website in other computer using domain name
My question is how to access my website in other computer in the same network using domain name.
i configure my web page using iis in windows server and the two machine in same domain
The easist way to achieve this is register local.firstsite.com in other computer's hosts file.
If you have an active domain, then you need to create a DNS forward lookup zone for firstsite.com and create cname local for firstsite.com. As long as your internal network share the same DNS Server and create IIS binding for the domain. The website should be accessed from domain name.

Host multiple websites using LAMP, Virtualmin and Cloudflare on Virtual Private Server

Currently all my websites are on Shared Hosting. Because of slow speed I am planning to migrate them to Virtual Private Server.
My plan is to use Virtualmin on this VPS. But I am not getting any idea how to host multiple websites using virtualmin as there will be only one IP address for my VPS.
How to setup DNS records for all the websites on CloudFlare Services as all the websites will point to same IP address how do they get distinguished from each other?
Do I need to configure DNS Server on virtualmin?

Resources