Apache server - domain name return "404 Not Found"

Dogomen

When I try to reach the site with my IP it works fine but when I try to use my domain name to connect I get "404 Not Found".
I am on Ubuntu Server 16.04.1 LTS

/etc/hosts/

127.0.0.1       localhost
127.0.0.1       zbytki.cz
127.0.1.1       zbytki.cz
192.168.123.106 zbytki.cz

/etc/apache2/sites-available/zbytki.cz.conf

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName zbytki.cz
    ServerAlias www.zbytki.cz
    DirectoryIndex index.html
    DocumentRoot /var/www/html/zbytki.cz/public_html
    LogLevel warn
    ErrorLog /var/www/html/zbytki.cz/log/error.log
    CustomLog /var/www/html/zbytki.cz/log/access.log combined
    <Directory "/var/www/html/zbytki.cz/public_html">
          Require all granted
    </Directory>
</VirtualHost>

/etc/hostname

zbytki.cz

/etc/apache2/apache2.conf

...
Timeout 300
...
KeepAlive Off
...
HostnameLookups Off
...
LogLevel warn
...    
AccessFileName .htaccess
...
<IfModule mpm_prefork_module>
     StartServers 4
     MinSpareServers 20
     MaxSpareServers 40
     MaxClients 200
     MaxRequestsPerChild 4500
</IfModule>

/etc/apache2/ports.conf

NameVirtualHost *:80
Listen 80
...

If you need more information just ask.
Can someone please help me ?

pa4080

Your web server's configuration is OK. To access certain host via host name, instead of IP-address, you must have pre-configured Domain Name Service / Server (DNS). There is two solutions:

1st. If you want you can configure yours own DNS which you can use in your local network. Here you go the manual - look at Primary Master configuration.

2nd. You can buy (register) a domain name from any DNS provider. This domain will be accessible from the Internet. For example I bought one from host.bg - there has a promotion of .info at the moment.

In this case you will need a (public) static IP-adress or pre-configured Dynamic DNS (DDNS), which will connects your dinamic IP-adress with the domain name.


I've made short survey and I found that domain zbytki.cz is registred from someone - hope that is you.

enter image description here

When I checked with $ nslookup zbytki.cz it returns: ** server can't find zbytki.cz: NXDOMAIN.

So the domain is registered but is not configured to work with certain (static) IP address.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Laravel 5.1 404 not found on apache server

From Dev

Laravel 5.1 404 not found on apache server

From Dev

Nginx returns 404 not found error when using domain name

From Dev

Apache Cordova: Failed to load resource: the server responded with a status of 404 (Not Found)

From Dev

404 not found , the requested URL <<url name>> not found on this server in wordpress

From Dev

Apache james email server on EC2 (domain name mapping)

From Dev

Host purchased domain name in apache2 ubuntu server

From Dev

OData routes return 404 Not Found

From Dev

Akka Http return 404 Not Found

From Dev

Akka Http return 404 Not Found

From Dev

Apache Tomcat Access Error: 404 -- Not Found

From Dev

Rest best practice: when to return 404 not found

From Dev

Github API Create Issues return 404 Not found

From Dev

API Route: Edit return 404 not found

From Dev

Links return to homepage domain name

From Dev

Are Domain Name Server and Name Server the same thing?

From Dev

Apache configuration file name without domain name

From Dev

Apache and Tomcat Server Cross Domain

From Dev

Set up domain on Apache server

From Dev

Nginx on Ubuntu Server throws 404 not found

From Dev

404 Not Found The requested URL was not found on this server

From Dev

404 Not Found when using Nginx Web Server

From Dev

Symfony Error The server returned a 404 Not Found

From Dev

Config codeigniter on remote server (404 not found)

From Dev

Express Server - GET request returns a 404 (Not Found)

From Dev

Simple NodeJS Server with Localhost, Error (404): "Not found"

From Dev

404 Not Found The requested URL /xxxxx was not found on this server

From Dev

Apache error "Could not reliably determine the server's fully qualified domain name"

From Dev

Apache server config redirect from IP to domain name EC2

Related Related

  1. 1

    Laravel 5.1 404 not found on apache server

  2. 2

    Laravel 5.1 404 not found on apache server

  3. 3

    Nginx returns 404 not found error when using domain name

  4. 4

    Apache Cordova: Failed to load resource: the server responded with a status of 404 (Not Found)

  5. 5

    404 not found , the requested URL <<url name>> not found on this server in wordpress

  6. 6

    Apache james email server on EC2 (domain name mapping)

  7. 7

    Host purchased domain name in apache2 ubuntu server

  8. 8

    OData routes return 404 Not Found

  9. 9

    Akka Http return 404 Not Found

  10. 10

    Akka Http return 404 Not Found

  11. 11

    Apache Tomcat Access Error: 404 -- Not Found

  12. 12

    Rest best practice: when to return 404 not found

  13. 13

    Github API Create Issues return 404 Not found

  14. 14

    API Route: Edit return 404 not found

  15. 15

    Links return to homepage domain name

  16. 16

    Are Domain Name Server and Name Server the same thing?

  17. 17

    Apache configuration file name without domain name

  18. 18

    Apache and Tomcat Server Cross Domain

  19. 19

    Set up domain on Apache server

  20. 20

    Nginx on Ubuntu Server throws 404 not found

  21. 21

    404 Not Found The requested URL was not found on this server

  22. 22

    404 Not Found when using Nginx Web Server

  23. 23

    Symfony Error The server returned a 404 Not Found

  24. 24

    Config codeigniter on remote server (404 not found)

  25. 25

    Express Server - GET request returns a 404 (Not Found)

  26. 26

    Simple NodeJS Server with Localhost, Error (404): "Not found"

  27. 27

    404 Not Found The requested URL /xxxxx was not found on this server

  28. 28

    Apache error "Could not reliably determine the server's fully qualified domain name"

  29. 29

    Apache server config redirect from IP to domain name EC2

HotTag

Archive