Need help with configuration its not working on a new Archlinux VPS

2016-09-28 Thread Jeffrey Scott Flesher Gmail
This is the haproxy.cfg file I have been running for years on an Ubuntu 12 VPS, I just installed this on an Archlinux VPS and its not working. Note:     acl has_path path / reqirep ^([^\ :]*)\ /(.*) \1\ /ww/\2 if has_path This is because its a Wt app and needs a url that starts off with a ww i

How do you tell if a url has a path

2014-07-07 Thread Jeffrey Scott Flesher Gmail
I want to check the URL to see if any path is passed, http://domain.tdl or http://domain.tdl/ as such, both of these are considered not to have a path, my problem is that I only want to rewrite the path, if either of the two are true, meaning it has no path, this fails: acl has_path_uri path_

Re: Need help with url rewrite

2014-07-04 Thread Jeffrey Scott Flesher Gmail
, Baptiste wrote: > On Thu, Jul 3, 2014 at 9:38 PM, Jeffrey Scott Flesher Gmail > wrote: > > I have a url that always begins with ww, ie http://domain.tdl/ww/en/..., I > > want to rewrite the url to include the ww, > > I tried the below, it works, but changes the path or s

Re: Need help with url rewrite

2014-07-03 Thread Jeffrey Scott Flesher Gmail
server, so not mod_rewrite. I hope this is clear enough, not sure how else to say it. Thanks On Thu, 2014-07-03 at 22:40 +0200, Baptiste wrote: > On Thu, Jul 3, 2014 at 9:38 PM, Jeffrey Scott Flesher Gmail > wrote: > > I have a url that always begins with ww, ie http://domain.tdl/

Need help with url rewrite

2014-07-03 Thread Jeffrey Scott Flesher Gmail
I have a url that always begins with ww, ie http://domain.tdl/ww/en/..., I want to rewrite the url to include the ww, I tried the below, it works, but changes the path or something, because it cause the resources like css and images to not appear (404), does anyone know how to fix this or do this

Need help with haproxy config

2014-07-01 Thread Jeffrey Scott Flesher Gmail
Below is my haproxy config, I have 1 server and 1 backend for testing This is a Wt wthttpd app, with no Apache loaded, Problem I have is that the path to the app seems to change when running from port 80 or haproxy, meaning I lost all my style sheets and resources, not sure what the path is at th

Is it possible to rewrite or redirect based on path

2014-06-24 Thread Jeffrey Scott Flesher Gmail
I have an acl rule to see if path begins with /ww as in domain.tdl/ww/en... acl has_ww_uri path_beg -i /ww If it is just the domain.tdl, I want to rewrite it to /ww ~ example.com/ww Do I do it like something like this: !has_ww_uri reqirep ^([^\ :]*)\ /(.*) \1\ /ww\2 But this does not work, does

How can I rewrite based on path?

2014-06-23 Thread Jeffrey Scott Flesher Gmail
I have an acl rule to see if path begins with /ww as in domain.tdl/ww/en... acl has_ww_uri path_beg -i /ww If it is just the domain.tdl, I want to rewrite it to /ww I also have static content I do not want to rename, so I added this rule acl url_static path_end .gif .png .jpg .css .js .pdf .m4v

Need help with configuration file

2014-06-19 Thread Jeffrey Scott Flesher Gmail
Below is the configuration, what I need is for all urls like http//domain.tdl/ww/... to use back end 1 or 2 or default load balancer, and all other request to go to Apache, but I get an error: [ALERT] 170/013846 (5151) : parsing [/etc/haproxy/haproxy.cfg:43] : error detected while parsing switchi