O que configurei aqui foi algo assim:
<VirtualHost *:8081>
ServerAdmin admin@localhost
ServerName localhost:8081
WSGIDaemonProcess projeto threads=25 display-name=%{GROUP}
python-path=/var/www/projeto/env/lib/python2.6/site-packages
WSGIProcessGroup projeto
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /var/www/projeto/src/django.wsgi
RewriteEngine on
RewriteCond %{ENV:Rewrite-Done} !^Yes$
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]+)\.
RewriteRule (.*) /%1 [E=Rewrite-Done:Yes,L]
</VirtualHost>
Porém, parece que quando acesso app.localhost:80801, ao invés de
redirecionar para localhost:8081/app ele redireciona para
app.localhost:8081/app e obtenho erro Not Found.
Resolvi o problema com um middleware, mas não gostei muito da solução,
então resolvi perguntar aqui pra ver se achava sugestões.
Obrigado e abraço.
--
diego
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !^/static/
RewriteCond %{HTTP_HOST} ^([^.]+)\.
RewriteRule (.*) /%1$1 [L,PT]
Porém agora acho que com o middleware ficou melhor :)
[1] http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
2011/3/30 Diego Manenti Martins <dmma...@gmail.com>:
--
diego