Servername is to specify the host header, defining different names but
calling http://10.1.1.76 won't help apache determine to which
virtualhost the request has to go, following the names you used, you
need to request http://cups/ or http://jasmine/ to make Apache httpd
recognize where requests will go, otherwise all requests will land in
the first virtualhost.
2017-06-01 20:14 GMT+02:00 Luiz Guilherme Nunes Fernandes
<narutospinal@xxxxxxxxx>:
> Well, i chek in log.
>
> When I try to access the first virtualhost it works normally.
>
> 10.251.14.140 - - [01/Jun/2017:15:01:35 -0300] "GET / HTTP/1.1" 304 -
> "http://10.1.1.76/admin" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0)
> Gecko/20100101 Firefox/45.0"
> 10.251.14.140 - - [01/Jun/2017:15:01:35 -0300] "GET /cups.css HTTP/1.1" 304
> - "http://10.1.1.76/" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0)
> Gecko/20100101 Firefox/45.0"
>
> Second virtualhost:
>
> 10.251.14.140 - - [01/Jun/2017:15:01:58 -0300] "GET /jasmine/ HTTP/1.1" 404
> 342 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
> Firefox/45.0"
> 10.251.14.140 - - [01/Jun/2017:15:01:58 -0300] "GET /cups.css HTTP/1.1" 304
> - "http://10.1.1.76/jasmine/" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0)
> Gecko/20100101 Firefox/45.0"
>
> My new configuration:
>
> <VirtualHost *:80>
>
> ServerName cups
> ProxyRequests off
> ProxyPreserveHost Off
> ProxyPass / http://localhost:631/
> ProxyPassReverse / http://localhost:631/
> </VirtualHost>
>
> <VirtualHost *:80>
>
> ServerName jasmine
> DocumentRoot /var/www/html/jasmine
> <Location "/var/www/html/jasmine">
> Require all granted
> </Location>
>
> </VirtualHost>
>
> Sorry, but I'm still confused, with 2 virtual hosts without reverse proxy
> work, but I need one with reverse proxy and another with documentroot source
> of apache. Why when I try to access jasmine, does it access my cups
> virtualhost?
>
> # I use with parameter and without.
> Log details:
> AH00548: NameVirtualHost has no effect and will be removed in the next
> release /etc/httpd/conf.d/teste.conf:1
>
>
>
> 2017-06-01 13:38 GMT-03:00 Daniel <dferradal@xxxxxxxxx>:
>>
>> Hello, if you define more than one virtualhost you need to distinguish
>> them somehow, so Apache knows where requests will "land".
>>
>> This "somehow" you must use is called ServerName, each virtualhost
>> must have a unique severname.
>>
>> Also if this is Apache httpd 2.2 you will need a directive called
>> "NamedVirtualhost *:80" defined once in server/global config.
>>
>> 2017-06-01 18:31 GMT+02:00 Luiz Guilherme Nunes Fernandes
>> <narutospinal@xxxxxxxxx>:
>> > Dears,
>> > i need redirect my apache for use cups and i need use Directory
>> > /var/www/html/jasmine with another application. What is a configuration
>> > correct? in apache show "Not Found" for directory of Jasmine, if i
>> > remove
>> > proxy pass directory jasmine work.
>> >
>> > <VirtualHost *:80>
>> >
>> > ProxyPreserveHost Off
>> > ProxyPass / http://localhost:631/
>> > ProxyPassReverse / http://localhost:631/
>> >
>> > </VirtualHost>
>> >
>> > <VirtualHost *:80>
>> >
>> > <Directory "/var/www/html/jasmine">
>> > Require all granted
>> > </Directory>
>> >
>> > </VirtualHost>
>> >
>> >
>> > --
>> >
>> > <<<<<<<<<<<<<<<<<<<----------------------------------------- -------------------------->>>> >>>>>>>>>>>>>>>
>> >
>> > < Disse-lhe Jesus: Eu sou o caminho, e a verdade e a vida; ninguém vem
>> > ao
>> > Pai, senão por mim >
>> > (João 14:6)
>> >
>> > Att.
>> > ♪ ♫ Luiz Guilherme Nunes
>> > Fernandes
>> > ♫ ♪
>> >
>> >
>> > <<<<<<<<<<<<<<<<<<<----------------------------------------- -------------------------->>>> >>>>>>>>>>>>>>>
>>
>>
>>
>> --
>> Daniel Ferradal
>> IT Specialist
>>
>> email dferradal at gmail.com
>> linkedin es.linkedin.com/in/danielferradal
>>
>> ------------------------------------------------------------ ---------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>
>
>
> --
> <<<<<<<<<<<<<<<<<<<----------------------------------------- -------------------------->>>> >>>>>>>>>>>>>>>
>
> < Disse-lhe Jesus: Eu sou o caminho, e a verdade e a vida; ninguém vem ao
> Pai, senão por mim >
> (João 14:6)
>
> Att.
> ♪ ♫ Luiz Guilherme Nunes Fernandes
> ♫ ♪
>
> <<<<<<<<<<<<<<<<<<<----------------------------------------- -------------------------->>>> >>>>>>>>>>>>>>>
--
Daniel Ferradal
IT Specialist
email dferradal at gmail.com
linkedin es.linkedin.com/in/danielferradal
------------------------------------------------------------ ---------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx