Estou usando mod_jk e mod_rewrite no httpd 2.2.15. Eu tenho uma regra ....
RewriteCond %{REQUEST_URI} !^/video/play\.xhtml.*
RewriteRule ^/video/(.*) /video/play.xhtml?vid=$1 [PT]
Eu só quero reescrever algo como / video / videoidhere para /video/play.xhtml?vid=videoidaqui
Isso funciona perfeitamente na minha máquina de desenvolvedor, mas na produção eu recebo um 404 (gerado pelo Jboss, não pelo Apache).
aqui está a cauda de access.log e rewrite.log no prod (quebrado). o rewrite.log é exatamente o mesmo no dev (trabalhando)
applying pattern '^/video/(.*)' to uri '/video/46279d4daf5440b2844ec831413dcc3b'
RewriteCond: input='/video/46279d4daf5440b2844ec831413dcc3b' pattern='!^/video/play\.xhtml.*' => matched
rewrite '/video/46279d4daf5440b2844ec831413dcc3b' -> '/video/play.xhtml?vid=46279d4daf5440b2844ec831413dcc3b'
split uri=/video/play.xhtml?vid=46279d4daf5440b2844ec831413dcc3b -> uri=/video/play.xhtml, args=vid=46279d4daf5440b2844ec831413dcc3b
forcing '/video/play.xhtml' to get passed through to next API URI-to-filename handler
"GET /video/46279d4daf5440b2844ec831413dcc3b HTTP/1.1" 404 420 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6"
eu posso acessar
link
mas não
/ video / 46279d4daf5440b2844ec831413dcc3b
Ambos os servidores estão usando o EXACT mesmo httpd.conf e módulos.
Eu criei o Apache com ...
./configure --prefix /usr/local/apache2.2.15 --enable-alias --enable-rewrite --enable-cache --enable-disk_cache --enable-mem_cache --enable-ssl --enable-deflate
Obrigado
Mason
---- ATUALIZAR ----
-mod-jk.conf
JkWorkersFile /usr/local/apache2.2.15/conf/workers.properties
JkLogFile /var/log/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkShmFile run/jk.shm
<Location /jkstatus>
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
-workers.properties
worker.node1.port=8009
worker.node1.host=75.102.10.74
worker.node1.type=ajp13
worker.node1.lbfactor=20
worker.node1.ping_mode=A #As of mod_jk 1.2.27
worker.node2.port=8009
worker.node2.host=75.102.10.75
worker.node2.type=ajp13
worker.node2.lbfactor=10
worker.node2.ping_mode=A #As of mod_jk 1.2.27
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node2,node1
worker.loadbalancer.sticky_session=True
worker.status.type=status
-httpd.conf
ServerName www.fivi.com:80
Include /usr/local/apache2.2.15/conf/mod-jk.conf
NameVirtualHost *
<VirtualHost *>
ServerName *
DocumentRoot /usr/local/apache2/htdocs
JkUnMount /* loadbalancer
RedirectMatch 301 /(.*) http://www.fivi.com/$1
</VirtualHost>
<VirtualHost *>
ServerName www.fivi.com
ServerAlias www.fivi.com images.fivi.com
JkMount /* loadbalancer
JkMount / loadbalancer
[root @ fivi conf] # /usr/local/apache2.2.15/bin/httpd -M
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
cache_module (static)
disk_cache_module (static)
mem_cache_module (static)
include_module (static)
filter_module (static)
deflate_module (static)
log_config_module (static)
env_module (static)
headers_module (static)
setenvif_module (static)
version_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
jk_module (shared)
Syntax OK