2
I’m trying to create a virtualhost here in the company, but it doesn’t work. The funny thing is that I created in the same way as other virtualhosts that are working normally.
Below is an example:
Virtualhost 1
<VirtualHost *>
ServerName manobra.henriquestefani.com.br
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/bpm/intranet"
</VirtualHost>
Virtualhost 2
<VirtualHost *>
ServerName retornoviagem.henriquestefani.com.br
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/retornoviagem"
</VirtualHost>
virtualhost1 works normally, while virtualhost2 does not.
Make sure you are not missing to put the new host in the file
/etc/hosts
.– Rodrigo Rigotti
Rodrigo in my etc/hosts file has only this line. 127.0.0.1 localhost 
.
– Oliver
This host has to be in the file
/etc/hosts
of the machine where the sites are, and not your.– Rodrigo Rigotti
Have you enabled both in apache? Since it’s two different folders and one works and the other doesn’t, check the permission. An error appears in the log?
– Thiago Silva
Yes he is in the machine where the sites are.
– Oliver
How do I check the permission?
– Oliver
@user5313 depends. Is your apache on Windows or Linux? Generally the apache user already has read and write permission in the htdocs directory and its contents. I think it would be more interesting if you put the server.log into a life frame...
– Edgar Muniz Berlinck
My apache is on Windows.
– Oliver
http://www.pastebin.ca/2640564
– Oliver
@Oliver, you can even check the permissions of the directory you defined as virtual and make sure the apache user has read and write privileges, but I don’t think that’s the problem. But watch it anyway and put it there in the comments.
– Edgar Muniz Berlinck
See if this link helps: http://www.vivaolinux.com.br/artigo/Virtual-Host-com-Apache/
– Edgar Muniz Berlinck
What version of apache?
– Thiago Curvelo
The apache version is 2.2. .
– Oliver
It is not necessary to put in the
/etc/hosts
. I have an apache with Virtualhosts here and I never had to put anything in it. In this case I think the domain itself is misconfigured in DNS.– NothingsImpossible