Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to configure only sub-domain in droplet.
I need help in configuring DNS to load test websites on subdomains. I get 403 forbidden error when I access the subdomain.
Let me brief about my requirement:
I have a number of domains for which websites are currently up and running at my other host a2hosting. Each of these domains have their email accounts. And for each domain, I have multiple subdomains. On some subdomains we have deployed operation support applications and some subdomains we use to test website changes before deploying it to production.
I want to do the migration to digital ocean droplet in phases with one domain at a time. At the moment we are looking to test the digitalocean droplet for performance of Magento 2.2.2 based website already running for one of the domains “www.abcdef.com” at a2hosting server.
As of now, I do not want to touch the main domain as it is in production. What I want is to point one of the subdomains “dev.abcdef.com” to this droplet so that we can test the performance of our production code in DigitalOcean.
Please note that, this droplet will be used not only for this domain abcdef.com and it’s single subdomain “dev.abcdef.com” but also to host a number of websites corresponding to my other domains and also for their respective subdomains in coming days. If the performance of our Magento 2.2.2 based website in this current testing goes well, then we may go for more droplets with higher configurations.
Note that, since I plan to use Varnish cache so I have set varnish at port 80 and the Apache server at 8080. Varnish and Apache, both are running on same droplet.
What I have done till now to achieve it:
I have configured a firewall for my droplet to accept all TCP connection on port 80 and 8080. Please help me know, if this is right considering the fact that I want to use Varnish for this Magento 2.2.2 based website but I may not use varnish for every website. Some other websites that I will later host on this droplet may be based on other technologies and varnish may not be required for each of them.
The domain abcdef.com is registered with bigrock and the corresponding website is currently hosted at a2hosting. So the Name Servers at bigrock currently points at a2hosting. I already have a sub-domain with name “dev.abcdef.com” at a2hosting which we use to test website changes. To test DigitalOcean droplet, I have changed the A records for the sub-domain “dev.abcdef.com” and “www.dev.abcdef.com” at a2hosting to point to the IP address (18.104.22.168) of droplet at DigitalOcean. I have not created any A records at domain registrar because the name servers configuration at domain registrar level already points to a2hosting IP address. So HTTP requests from user goes to my domain registrar, from there it goes to a2hosting and then from there I route request for subdomain dev.abcdef.com to droplet at Digital Ocean.
I have configured domain and DNS at droplet as below:
Created a domain “abcdef.com” under Networking section.
Following are my DNS records for this domain:
|A||dev.abcdef.com||directs to 22.214.171.124||3600|
|NS||abcdef .com||directs to ns1.digitalocean.com.||1800|
|NS||abcdef .com||directs to ns2.digitalocean.com.||1800|
|NS||abcdef .com||directs to ns3.digitalocean.com.||1800|
- I am using Webmin to configure Virtual Hosts Following is my Virtual Host Settings in httpd.conf file.
allow from all
Require all granted
- I get 403 Forbidden error when I access the subdomain in url:
- The ping command to this subdomain results in timeout error as follows:
Pinging dev.abcdef.com [126.96.36.199] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 188.8.131.52: Packets: Sent = 3, Received = 0, Lost = 3 (100% loss)
- The tracert command also gives timeout error as shown following:
Tracing route to dev.abcdef.com [184.108.40.206]
over a maximum of 30 hops:
1 4 ms 2 ms 1 ms Tenda.Home [192.168.1.1]
2 4 ms 8 ms 7 ms 10.0.0.1
3 3 ms 2 ms 2 ms pacenet.36.0.101.in-addr.arpa [220.127.116.11]
4 111 ms 114 ms 108 ms dsl-ncr-dynamic-18.104.22.168.airtelbroadband.in [22.214.171.124]
5 141 ms 116 ms 98 ms 126.96.36.199
6 132 ms 158 ms 161 ms 188.8.131.52
7 145 ms 137 ms 103 ms 184.108.40.206
8 * * * Request timed out.
I hope I could explain my problem to a satisfactory level. I have also raised a ticket with all these details for this issue but you can make out if I have to explain it again here on forum to get a solution, then how things would be there…
Can someone help me achieve my this simple requirement as explained above. I will be grateful to that helping hand!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×