0

I use LAMP and add to it virtual host ololo.loc! when I use links http://ololo.loc it works and i can see file from /var/www/ololo.loc/ when I use localhost in links it works too and i can see file from /var/www - default folder! but when i connect to my local web server from notebook when i use my local ip - it works with /var/www when i paste ololo.loc i see again file from /var/www hosts at notebook and server is ok:

127.0.0.1        www.ololo.loc ololo.loc #server
192.168.1.4      www.ololo.loc ololo.loc #notebook

Vrtual host file is

<VirtualHost ololo.loc:80>
    ServerAdmin webmaster@localhost
    ServerName ololo.loc
    ServerAlias www.ololo.loc
    DocumentRoot /var/www/html/
</VirtualHost>

i try to do it with ip into like this -same problem

where is the problem? sorry for my bad english. Can you help me?

1 Answers1

1

First, perhaps you can edit your question and differentiate olololo into different letters for the domain part. abcde.com is just a lot better to read.

Second, do NOT give the same IP addresses to different hostnames in /etc/hosts.

Third, /var/www/ololo.loc/ is not visible anywhere in your configuration.

Fourth, what is "/var/www - default folder"? /var/www/html?

lkraav
  • 786
  • 1
  • 8
  • 22