POint domain to ec2 ip with page name - html

I have a domain in bigrock and Ihave ec2 instance running on aws with elastic ip.
Over there I have instantiated tomcat server and it has my website files in its htdocs folder.
I have managed DNS of bigrock to this ec2 ip.
So when I browse for my domain name in browser it launches tomcat home home page insteade of index.html file
So how can I load index.html file by default?

You can't point a domain name to a specific web page. A domain name points to a server. You have already configured your domain name correctly.
You have a few options:
Configure Tomcat to serve your application as the root context.
Place a reverse proxy like Nginx in front of Tomcat, and configure it to route requests to your Tomcat app.

Related

Configure Subdomain on single amazon lightsail instance

i have successfully installed my application using this technique https://docs.bitnami.com/aws/infrastructure/lamp/administration/create-custom-application-php/
my main domain xyz.com is working fine .now i want to install wordpress in a folder and point it to subdomain blog.xyz.com .kindly guide me how to create subdomoain on amazon lightsail bitnami to point to my directory opt/bitnami/apache/htdocs/blog.
one other thing currently my subdomain blog.xyz.com is also showing root website xyz.com
Bitnami Engineer here,
You will need to follow the same guide to deploy the WordPress application on top of your current instance. However, when configuring the vhosts files (wordpress-vhost.conf and wordpress-https-vhost.conf files), you will need to set the domain you want to use to access WordPress
...
ServerAlias blog.xyz.com
...
https://httpd.apache.org/docs/2.4/mod/core.html#serveralias
Note: You can set the ServerName parameter as well.
https://httpd.apache.org/docs/2.4/mod/core.html#servername

Hosting HTML page with mp4 video in IIS 8 not working with hostname

I have a simple html page with video element that plays a video file of mp4 extension. I hosted the page in IIS 8. The MIME Type is configured correctly by default. If I browse using the server name it works fine but when I use the hostname the video does not play. The domain is from Godaddy and it is pointing to our public IP and then we have a load balancer that directs the requests to the two nodes servers.
Any ideas what could be the problem?
If you are able to resolve and access the server by server name then you must be calling the server from the internal network and are likely resolving to the internal IP address.
When you are calling the domain name then this will likely be resolving the public IP address from the DNS server where the A record is being hosted - GoDaddy.
ping <server name>
ping <dns name>
In order to test, please update your hosts file with the DNS name resolving to the internal IP address.
%WinDir%\System32\Drivers\Etc
<internal IP address> fqdns.com
If you try to call an external IP address being provided by a DNS server (GoDaddy) it is probably located on your firewall. Your connection will likely be dropped by the firewall due to anti-spoofing rules.

Associate ec2 to godaddy on tomcat using 8080 port

I created an ec2 instance and installed apache tomcat on that instance.
I have my java and html code on that apache 8080 server. I want to host the html folder of the code to godaddy. The address for the index page will be something like:
amazonPrivateIp:8080/abc/html.
How can I make godaddy direct my domain directly to this part of the instance?

Subdomain to html

First of all I want to say that I'm new to the workings of DNS and server behavior.
Now I recently purchased a domain name, which redirect to my VPS IP adress.
on my linux VPS I have 2 folders with html files:
/var/www/html/home (containing):
home.html
/var/www/html/admin (containing):
admin.html
Since on the dns you can only type in an IP adress i don't know how to redirect the following:
admin.domain.nl -> html/admin/admin.html
domain.nl -> html/home/home.html
I want to have this working before launching a Java EE application.
You don't do that type of routing using DNS.
DNS maps a hostname to an IP addresses, so your DNS configuration would look like this (using made-up IP addresses):
domain.nl A 123.45.67.89
admin.domain.nl CNAME domain.nl.
Then you configure your web server (Apache?) to serve different content based on the hostname included in the HTTP request. This is called "virtual hosts" in apache.
How to set this up is off-topic for StackOverflow

External IP address appears instead of Domain Name

I am running a website in Google Compute Engine and configured a DNS zone and an A record to point to the IP address where my web-server runs. In my domain registrar (GoDaddy), I changed name-servers to point to Google name servers.
I can browse to the website without issues, but it show the IP address of the server instead of domain name. How can I change that to show domain name such as www.example.com instead?
I have a website hosted in GCE running under a Linux machine Apache Server. I created an A record in my DNS pointing to the external IP address of the server. When I access the link the subdomain name is not replaced by the IP. I do not believe your issue is particularly related to Compute Engine.
Particularly if you are using WordPress you will need to change some configuration files as stated in
http://codex.wordpress.org/Changing_The_Site_URL
https://wordpress.org/support/topic/browser-displaying-ip-instead-of-domain-name
The below solution worked for me,
GCP set IP Address as site URL when you deploy WordPress on google cloud.
Please change it to your domain name,
WordPress Admin Panel >> Settings >> Site URL (& WordPress URL as
well) >> add your domain name into textbox
Attached is the image for your reference.