| View previous topic :: View next topic |
| Author |
Message |
Arkham Tux's lil' helper

Joined: 30 Aug 2004 Posts: 111 Location: Quilpue, Chile
|
Posted: Mon Dec 04, 2006 2:23 pm Post subject: Apache Rewrite rules (Plone Site) [SOLVED] |
|
|
Dear Fellows:
I'm close to a nervous breakdown
It's been quite a freaking hell to set the rewrite rules in order to get a plone site working (still not working btw). I've followed almost every how-to and there's this thing that keeps bothering me...
everyone says that the "basic" test for the rewrite rules is
| Code: | | RewriteRule ^/(.*) http://my_host:8080/$1 |
that is supposed to redirect everything from my_site to my_site:8080 right? Well, guess what... nothing happens, it just sits in my_site
ReWrite rules ARE working, I've tried with some specific rules.... apache is started with -D PHP -D PROXY -D VIRTUAL_HOST
my main goal is to have redirect my plone site in
my_host:8080/my_site/ -----> my_host/my_site/
any updated tutorial or some charitative soul willing to help me?? (it's christmas!!!!)
Thanks
?
Last edited by Arkham on Tue Dec 05, 2006 2:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
sp7xfq n00b


Joined: 28 Dec 2005 Posts: 60 Location: Poland, Kielce
|
Posted: Mon Dec 04, 2006 3:02 pm Post subject: |
|
|
Hi
here is part of my working config
| Code: | <VirtualHost *:80>
ServerName my_serv
RewriteEngine On
RewriteRule /(.*) http://my_serv:8080/$1 [R]
ErrorLog logs/my_serv-error_log
CustomLog logs/my_serv-access_log combined
</VirtualHost>
|
Maybe it'll be usefull for you.
br _________________ Andrzej Sobczyk
Feel free to correct my English |
|
| Back to top |
|
 |
Arkham Tux's lil' helper

Joined: 30 Aug 2004 Posts: 111 Location: Quilpue, Chile
|
Posted: Mon Dec 04, 2006 4:03 pm Post subject: |
|
|
Thanks for the reply...
but still I don't get anything redirected =(
I've tried that rewrite rule but I still get stuck at the "normal" site, not the rewriten site =(
are you using 2 virtual hosts conf files? or just 1?
Thanks again
? |
|
| Back to top |
|
 |
sp7xfq n00b


Joined: 28 Dec 2005 Posts: 60 Location: Poland, Kielce
|
Posted: Tue Dec 05, 2006 7:59 am Post subject: |
|
|
Hi,
I've got over 30 vhost config files There is clause [R] in my config quoted above, it means [R]edirect, so if the engine works you should be redirected to new address. In your browser's address bar address should be new address visible.
IMO you may try following checks:
- Add in /etc/conf.d/apache2 option `-D INFO` into APACHE2_OPTS, then check presence (and config) of `mod_rewrite.c` at http://your_server/server-info.
- Add to your vhost config lines
| Code: | RewriteLog logs/rewrite.log
RewriteLogLevel 9 | then examine `rewrite.log` file;
Maybe you've set RewriteCond in wrong way
Dunno what else _________________ Andrzej Sobczyk
Feel free to correct my English |
|
| Back to top |
|
 |
Arkham Tux's lil' helper

Joined: 30 Aug 2004 Posts: 111 Location: Quilpue, Chile
|
Posted: Tue Dec 05, 2006 2:56 pm Post subject: |
|
|
Wohooo!!!
Finally got it working.. thanks for the replys man, they really helped me
My original situation:
I have apache server running on http://myserver/ or http://myserver:80/ (intranet, so not FQDN)
and zope/plone running on http://myserver:8080/mysite/
I wanted to eliminate the numbers from the URL... specifically the plone's port number (8080)
meaning I can access it by just http://myserver/mysite/ and NOT http://myserver:8080/mysite/, ok?
I edited 00_default_vhost.conf, posting relevant, and context so you can find it ,
Please note that you ONLY need to change the references to myserver and mysite
| Code: |
<IfDefine DEFAULT_VHOST>
<VirtualHost *:80>
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
ServerName myserver
RewriteEngine on
RewriteRule /mysite(.*) http://myserver:8080/VirtualHostBase/http/%{SERVER_NAME}:80/mysite/VirtualHostRoot/_vh_mysite/$1 [L,P]
#ErrorLog logs/ultraman_error_log
DocumentRoot "/var/www/localhost/htdocs"
#
# This should be changed to whatever you set DocumentRoot to
|
Hope this helps somebody
take care
? |
|
| Back to top |
|
 |
|