Re: mod_rewrite + proxy + unix socket results in 400 bad request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



IIRC it was by design yes, but I don't know the reasons behind it,
perhaps the dev mailing list or some developers reading this can
provide more information. You could also try #httpd-dev at Freenode.

I think you could reach your goals without using captured groups
though, I see in the initial virtualhost you shared, that there is no
servername, so probably you are only using that one for a few or
several hostnames, so you could just define separate virtualhosts with
their names and their own socket path, you can use "in-config"
variables with Define directive to avoid typing the same thing several
times or even use mod_macro, here is a brief example with in-config
variables:

Define subdomain1 printers
<VirtualHost *:80>
       ServerAdmin webmaster@localhost
       ServerName ${subdomain1}.example.com
       DocumentRoot /var/www/html
       LogLevel trace2

       UseCanonicalName Off

       ProxyPass / unix:/home/user/${subdomain1}/server.sock|http://127.0.0.1/
       ProxyPassReverse /
unix:/home/user/${subdomain1}/server.sock|http://127.0.0.1/
...
</VirtualHost>

Define subdomain2 mail
<VirtualHost *:80>
       ServerAdmin webmaster@localhost
       ServerName ${subdomain2}.example.com
....etc

2017-09-04 11:03 GMT+02:00 David Mugnai <dvd@xxxxxx>:
> Excerpts from Daniel's message of settembre 1, 2017 9:57 :
>>
>> AFAIK you can't use variables of captured groups when using sockets,
>> but I don't have an answer to why. To check If I'm correct you could
>> try using a tcp port instead of socket.
>
>
> You are right, switching the test environment to tcp works.
> Unfortunatley this not works with our planned deploy; do you know if the
> limitation is by desing?
>
> david
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>



-- 
Daniel Ferradal
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux