Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache Rewrite rules (Plone Site) [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Arkham
Tux's lil' helper
Tux's lil' helper


Joined: 30 Aug 2004
Posts: 111
Location: Quilpue, Chile

PostPosted: Mon Dec 04, 2006 2:23 pm    Post subject: Apache Rewrite rules (Plone Site) [SOLVED] Reply with quote

Dear Fellows:

I'm close to a nervous breakdown :cry:
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
View user's profile Send private message
sp7xfq
n00b
n00b


Joined: 28 Dec 2005
Posts: 60
Location: Poland, Kielce

PostPosted: Mon Dec 04, 2006 3:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Arkham
Tux's lil' helper
Tux's lil' helper


Joined: 30 Aug 2004
Posts: 111
Location: Quilpue, Chile

PostPosted: Mon Dec 04, 2006 4:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
sp7xfq
n00b
n00b


Joined: 28 Dec 2005
Posts: 60
Location: Poland, Kielce

PostPosted: Tue Dec 05, 2006 7:59 am    Post subject: Reply with quote

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:
  1. 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.
  2. Add to your vhost config lines
    Code:
    RewriteLog logs/rewrite.log
    RewriteLogLevel 9
    then examine `rewrite.log` file;
  3. Maybe you've set RewriteCond in wrong way
  4. Dunno what else :?:

_________________
Andrzej Sobczyk


Feel free to correct my English
Back to top
View user's profile Send private message
Arkham
Tux's lil' helper
Tux's lil' helper


Joined: 30 Aug 2004
Posts: 111
Location: Quilpue, Chile

PostPosted: Tue Dec 05, 2006 2:56 pm    Post subject: Reply with quote

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 :wink: ,
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum