I am now looking at HAProxy. It seems to be the easiest way.

I am little bit confused about what to do with the Apache previous config. 
You will see my current Apache config (before using HAProxy.

I am pretty sure that I must amend the virtualhost dealing with to remove 
the Proxy lines. If HAProxy does the task now. Surely Apache will not do it 
anymore.

In order to do so, I simply removed all lines related to Proxy in the 
second bit of the Apache config. Unfortunately, 
then http://ape.local.ape-project.org/ can't be reached. 
I then tried to remove the 2nd virtual host altogher. But it is not an 
improvement. Then ape.local.ape-project.org si redirected to 
ape.local.ape-project.org/en/ as per the first virtual host settings.

So is it correct in removing the proxy lines in the 2nd virtual host (and 
in that case, it is just my Haproxy config that is wrong) or is there 
anything else to do?

Thanks for your help!


<VirtualHost *:80>

Servername local.ape-project.org

DocumentRoot "/mnt/hgfs/HM/"
#/var/www/TestAPE2/"

RewriteEngine on 
RewriteLog "/var/www/apache_log/rewrite_hm_80.log"
RewriteLogLevel 8

# Add / at the end of URL that don't have it (www.happymeeple.com/fr => 
www.happymeeple.com/fr/)
RewriteRule ^/([a-z]{2})$ $1 [R=301,L]

# Exclude some directories from all rewriting
RewriteRule ^/(phpmyadmin|phpmyadmin_test|games|media|forum)($|/) - [L]

        # Rewrite the / default to /en/index.php
        RewriteRule ^/$ /en/ [R=301,L]

# All URLs that do not have a "." and at least one directory behind the  in 
them are considered for the new architecture (folder architecture) and are 
redirected to /info/direct_to.php page
RewriteCond %{REQUEST_FILENAME} !\.
        RewriteCond %{REQUEST_FILENAME} !^/js/
    RewriteRule ^/([a-z]{2})/([^/]+)/?([^/]*)/?([^/]*)/?([^/]*)/?([^/]*)/?$ 
/info/direct_to.php?f2=$2&f3=$3&f4=$4&f5=$5&f6=$6&f7=$7&lang=$1 [NC,L,QSA]

# Rewrite only PHP files
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule ^/([a-z]{2})/(.*)$ /$2 [NC,L,QSA] # If this is put in 
.htaccess, it works withtout the leading slash (/) (!!!!!!!) Here is what 
it will look like: #RewriteRule ^([a-z]{2}/)(.*)$ $2?lang=fe [NC,L]


# Rewrite all but PHP,CSS,JS files
RewriteCond %{REQUEST_FILENAME} !.*\.php$
        RewriteCond %{REQUEST_FILENAME} !^/js/
        RewriteCond %{REQUEST_FILENAME} !^/css/
# We get rid of the language attribute
RewriteRule ^/([a-z]{2})/(.*)$ /$2 [NC,L,QSA]


# Rewrite only PHP files
RewriteCond %{REQUEST_FILENAME} \.php$
# Old URLs that did not have a language directory will now be redirected to 
the URL with directory "en" (English)
RewriteRule ^/(.*)$ /en/$1 [R=301] # QSA est fait automatiquement ici ???

php_value include_path /mnt/hgfs/HM/inc
#php_value include_path ".:/var/www/TestAPE2/inc"

ErrorDocument 404 /en/warning/page-does-not-exist/

</VirtualHost>

<VirtualHost *:80> 

    ServerName ape_on_optiplex_9020
    ServerAlias ape.local.ape-project.org
    ServerAlias *.ape.local.ape-project.org

# Everything expires after 10 months except php files that are not cached
ExpiresActive On
ExpiresDefault A2592000
#10 months
ExpiresByType text/php A0

    ProxyRequests Off 
    ProxyPreserveHost On 
    <Proxy *> 
        Order deny,allow 
        Allow from all 
    </Proxy> 

   ProxyPass / http://localhost:6969/ 
   ProxyPassReverse / http://localhost:6969/ 
    <Location /> 
        Order allow,deny 
        Allow from all 
    </Location> 

</VirtualHost> 



-- 
-- 
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