Forum Moderators: phranque
I've got a wicket application and I want wordpress running together with it.
At the moment when you do www.example.com, you got to wicket application. I'm trying to setup word press so that when you type www.example.com/blog you go to the word press blog. I've tried using the setup below but I always seem to get a 404...
I've tried
RewriteRule ^/blog/$ /var/www/html/example/blog/ [L]
and
Alias /blog /var/www/html/example/blog
neither work, both are commented out below.
<VirtualHost *:80>
ServerAdmin web@example.com
ServerName www.example.com:80
ErrorLog logs/example.com-error_log
CustomLog logs/example.com-access_log common
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine On
RewriteLog /etc/httpd/logs/example.com-rewrite_log
#Alias /blog /var/www/html/example/blog
#RewriteRule ^/blog/$ /var/www/html/example/blog/ [L]
RewriteRule ^/(images/.+);jsessionid=\w+$ /$1 [P]
RewriteRule ^/(flash/.+);jsessionid=\w+$ /$1 [P]
RewriteRule ^/(css/.+);jsessionid=\w+$ /$1 [P]
RewriteRule ^/(js/.+);jsessionid=\w+$ /$1 [P]
RewriteRule ^/.aspx$ /app/ [P] [R] [L]
ProxyPass / [localhost:8080...]
ProxyPassReverse / [localhost:8080...]
</VirtualHost>
Thanks for any help!
aridh
Take a look at your server error log; It will tell you the filepath that your server is attempting to resolve the /blog URL requests to. Looking at that, the required adjustment to the filepath should be obvious.
Jim
Thanks for replying. This is what I'm seeing in the logs..
[29/Jan/2009:16:42:56 +0000] "GET /blog/ HTTP/1.1" 404 1245
[29/Jan/2009:17:43:20 +0000] "GET /blog HTTP/1.1" 301 -
[29/Jan/2009:17:43:20 +0000] "GET /blog/ HTTP/1.1" 404 1245
[29/Jan/2009:17:43:29 +0000] "GET /blog/ HTTP/1.1" 404 1245
[29/Jan/2009:18:02:16 +0000] "GET /blog HTTP/1.1" 503 414
[29/Jan/2009:18:02:21 +0000] "GET /blog/ HTTP/1.1" 503 414
[29/Jan/2009:18:02:48 +0000] "GET /blog/ HTTP/1.1" 503 414
[29/Jan/2009:18:02:49 +0000] "GET /blog/ HTTP/1.1" 503 414
[29/Jan/2009:18:02:51 +0000] "GET /blog HTTP/1.1" 503 414
[29/Jan/2009:18:03:23 +0000] "GET /blog HTTP/1.1" 404 1245
Will try changing doc root as suggested...
aridh
[Thu Jan 29 18:02:08 2009] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Thu Jan 29 18:02:08 2009] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Jan 29 18:02:08 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:08 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:08 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:14 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:14 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:16 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:17 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:17 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:18 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:20 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:21 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:48 2009] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Thu Jan 29 18:02:48 2009] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Jan 29 18:02:49 2009] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Jan 29 18:02:51 2009] [error] proxy: HTTP: disabled connection for (localhost)
It's not clear why you are attempting to reverse-proxy these requests in the first place, so you might want to simply replace the [P] flags on the /blog rules with [L].
Also "[P] [R] [L]" in your last rule is invalid. I suggest using only "[L]"
Also, be aware that if it was your intent to check query string values with those ";jsession=" patterns in your RewriteRules, that will not work. You will need to check the query strings separately using RewriteConds; RewriteRules see only the localized requested URL-path, and not any query string data appended to that URL-path. Generalized format:
RewriteCond %{QUERY_STRING} [i]pattern[/i]
RewriteRule [i]localized-URL-path-pattern substitution[/i] [[i]flags[/i]]