The thing is ou can't have two thing running on the same port. It's like
telephone extensions in a office. Right now, when people call your office
(server) at the office number (port 80), they are dispatched directly to
Apache which transfert the call (proxy) to APE (at extention 6969) if
Apache see that the call is for APE.

HaProxy act as the receptionist. When someone call the office (server) on
the office number (80), the fisrt person they get to is the receptionist
(HaProxy) who dispatch the call to APE (at extention 6969) if the call is
for APE (Either a websocket connexion or a specific subdomain) OR Apache
(now moved at extention 8080) if the call is not for APE.

It goes like this (see attached file if now displayed right under).
[image: Images intégrées 1]
So you basically need to relocate Apache on port 8080 (or anything you
want). This needs to be done for all the virtualhosts and there is also a
global config I think for it (google it).


(And the nice thing about HaProxy: if you want to scale your office, it
really act as a receptionist. If Apache is not avaiable for some reason or
is overloaded, HA can take care of loadbalacing between multiple (apache)
server. You also could, technically, even have APE on a different host with
this).


2016-05-09 11:42 GMT-04:00 Nicolas <[email protected]>:

> I stopped Apache. Haproxy could start. Now Apache does not want to start:
> )Address already in use: make_sock: could not bind to address [::]:80
>
> So I undersstand that Haproxy takes all incoming things from port 80???
>
> Isn't there a way for Haproxy to deal with things from
> ape.local-ape-project.org and Apache to deal the rest of the things going
> to 80?
>
> That's what I have in my prod configuration (with the virtual hosts). Does
> it have to change??? I am sure not.
>
> Nicolas.
>
>
>
> On Monday, May 9, 2016 at 5:17:04 PM UTC+2, Louis Charette wrote:
>>
>> Hi,
>>
>> You can have a look at this. It could be outdated if there's a newer
>> version of HaProxy around, but it's still a good place to start:
>> https://github.com/APE-Project/APE_Server/wiki/APE-Server-on-port-80-with-HAProxy
>>
>> What you want is to have Apache listening on port 8080 (or whatever you
>> want) for your standard website need and APE on 6969. Then you tell HaProxy
>> that if the connexion is a websocket type or comes from the specified
>> subdomain, it should redirect it to APE and everything else to Apache. So
>> then you don't need an apache domain or proxy seting for Ape anymore. The
>> subdomain is handled by HaProxy (who is on port 80).
>>
>> For the error part, HaProxy cannot bind the port (80) because Apache is
>> probably still using it.
>>
>>    - Louis
>>
>> 2016-05-09 11:10 GMT-04:00 Nicolas <[email protected]>:
>>
>>> I am still not sure how to amend the Apache setup but in the meantime, I
>>> realized that Haproxy was not actually started.
>>>
>>> So I try to start Haproxy. But now I run into at least 2 issues.
>>>
>>> 1) on config option fails with the text:
>>> unknown option http-server-close
>>> That does not make sense. I can't find anything on the web related to
>>> this.
>>>
>>> 2) If I comment the option, I get the following error which does not
>>> look good either :(
>>>  Starting frontend public: cannot bind socket
>>>
>>> Help appreciated :)
>>>
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "APE Project" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/ape-project?hl=en
>>> ---
>>> APE Project (Ajax Push Engine)
>>> Official website : http://www.ape-project.org/
>>> Git Hub : http://github.com/APE-Project/
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "APE Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Louis
>>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/
>
> ---
> You received this message because you are subscribed to the Google Groups
> "APE Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Louis

-- 
-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--- 
You received this message because you are subscribed to the Google Groups "APE 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to