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 admin@zbytki.cz
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 ?
$ a2ensite zbytki.cz.conf
applied? – pa4080 Sep 12 '16 at 17:15http://zbytki.cz
(http://192.168.123.106
) by second PC from your local network - is that true? – pa4080 Sep 12 '16 at 19:29$ sudo apt install lynx
;lynx zbytki.cz
. – pa4080 Sep 12 '16 at 19:40$ lynx zbytki.cz
, executed from server's console? – pa4080 Sep 12 '16 at 19:50127.0.1.1 www.zbytki.cz
in/etc/hosts
it will work too. – pa4080 Sep 12 '16 at 20:53