F
F
Funny_Man2017-02-19 18:30:53
Domain Name System
Funny_Man, 2017-02-19 18:30:53

Why can I access the site by IP address, but not by domain?

Hello. I've been struggling with this issue for a week now.
I am using apache2 on widows serer 2012 r2.
I rented a domain and configured it to my IP address. If I use the ping command, the site pings and knocks out my IP, but I can only access the site by IP. How to make it possible to go to it by domain?
here is the code,
vhosts.conf file

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 194.247.13.189:9900>
    ServerAdmin [email protected]
    DocumentRoot "f:/USR/www/briltennisonline_com"
    ServerName briltennisonline.com
    ServerAlias www.briltennisonline.com
    ErrorLog "f:/USR/log/briltennisonline_com/error.log"
    CustomLog "f:/USR/log/briltennisonline_com/access.log" common
</VirtualHost>

hosts.conf
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows 	

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
  194.247.13.189       briltennisonline.com

Help me please.
Most likely the problem is not in these 3 files, then tell me what? The problem is 100% server side. Thank you.
Z.Y. I am using port :9900

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2017-02-19
@Funny_Man

If you want to visit briltennisonline.com without specifying a port, then use port 80.
Because the default browser connects to the eightieth.
Or on your router, make a redirect 80-> 9900

D
Dimonchik, 2017-02-19
@dimonchik2013

DNS ok, Ping ok,
look for why Apache does not inject the answer to the server name
somewhere in this construct
<VirtualHost 194.247.13.189:9900>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question