Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jul 7 '11 at 14:30

This question came from our site for professional and enthusiast programmers.

1 Answer 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?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.