1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

running zope by means of mod_rewrite

Discussion in 'Plesk for Linux - 8.x and Older' started by twold, Aug 19, 2005.

  1. twold

    twold Guest

    0
     
    Hi everybody.
    I am trying to run zope instance from plesk. I've already found out that I have to use vhost.conf, but that's everything I was able to find.
    I tried to put there something like this:

    Code:
      RewriteEngine on
      RewriteRule ^/(.*) [url]http://62.176.162.30:8080/VirtualHostBase/http/test.www43.com:80/plone/VirtualHostRoot/[/url]$1 [L,P]
    
    This rule is ok, when run from normal apache server, but I am not able to figure out how to get it running from behind plesk.

    Am I doing something wrong?
    Or is this completely wrong approach?
    Anyway, please let me know how to set it up correctly.
    Thanks
     
  2. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    Hi, Please search the forum, I posted some time ago the way to install and configure zope + plone to run under plesk, using separeted python :)

    Tia
     
  3. twold

    twold Guest

    0
     
    Hi Spyder, thanks for reply!
    I already searched the little about the zope in the forum there was and have seen your tutorial, but that's not what I want to do.
    I have single zope instance running elsewhere that manages all the plone sites (as I do not see the point of creating a zope instance for every domain I host)
    IMHO, my problem is implementing mod_rewrite into Plesk. As I wrote, I can do it with bare apache, but wasn't able to get it running via plesk vhost.conf.
    So, can you please tell me, if it suffices to add "RewriteEngine On" and "RewiteRule from...to" to the vhost.conf? ...from your tutorial it looks it does, but that doesn't seem to work for me.

    Btw, I am not the admin of the site, where it is supposed to run. But as the admin is currently away and our company has deadlines to setup our plone sites, I am the one who has to do it :) . So maybe something else is not working, maybe mod_rewrite is not running at all. I do not know, because I really know very little of plesk (again, I am not admin) and I wasn't able to find even the main httpd.conf that plesk uses. Could you point me in the right direction?

    Thanks.
     
  4. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    Forgive-me for delay :)

    dumb question... did you restarded apache after editing the vhosts.conf ??

    Besides plesk do this time to time I prefer every modification restart apache.

    The point in mantain several zopes is easy to me do maintance in separeted clients.. one zope instance non interfer with other.. client instance..

    Tia.
     
  5. Who-m3

    Who-m3 Guest

    0
     
    Although I'm sure this quesiton has already been asked to you directly, I don't see it in the forums, so I must do my part and as if you've told psa to update the apache files. This should be a simple: /usr/local/psa/admin/bin/websrvmng -a
    After that, a service apache restart (or restarting apache through the Plesk interface) should allow for the new changes to the config to be noticed by apache. This should get your vhost.conf directives working. They may not be doing what you want them to, but it should allow them to work.
     
  6. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    Ok ... it´s an option, but without restart of daemon nothin is done :)


    ./websrvmng -a => reconfigure ....


    ./websrvmng -r => restart

    or ./websrvmng -h | more

    Tia.
     
  7. Who-m3

    Who-m3 Guest

    0
     
    Without first reconfiguring, if no vhost.conf file was there before, apache wont know to follow any specific directives, as the httpd.include for the domain wont reference the vhost.conf file. So, if you fail to do the reconfigure, doing the restart will do nothing. And I did include a forced restart for the deamon, with two different methods to access that.
     
  8. twold

    twold Guest

    0
     
    Hi everyone and thanks for replies!
    I figured out the restart stuff already, I realized that -a option did just reconfigure the confs, not doing anything useful really :)
    So, here's where I am now: I succesfully rewritten the URL, but I keep getting some permission denied message and have really no idea where could that one come from.
    here's the link: My plone site

    Another thing is configuration already present. There was an DocumentRoot directive in there and it pointed to our physical host. Is it of any importance when the mod_rewrite is activated?
     
  9. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    verify the outpu of runzope script... and check if the user running zope

    ---
    vi zope.conv

    There are two sections you need to edit,
    effective-user and servers. Where it says:
    ---

    is the same who own the files (basicaly in my instalations the same as ftp user for domain.

    about the websrvmng point..

    Generaly I simple editing the

    /usr/local/psa/home/vhosts/some_domain/conf/httpd.include

    puting the


    Include /usr/local/psa/home/vhosts/some_domain/conf/vhost.conf

    statment before the </VirtualHost>

    and in the vhost.conf put this..

    #Hack to rewrite deliver Zope content
    RewriteEngine On
    RewriteLog "/usr/local/psa/home/vhosts/some_domain/statistics/logs/access_log combined rewrite_log"
    RewriteLogLevel 0
    RewriteRule ^/local/ - [L]
    RewriteRule ^/(.*) http://some_domain:8080/VirtualHostBase/http/%{HTTP_HOST
    }:80/$1 [L,P]
    #hack tp 20 Mb upload file
    <Directory /usr/local/psa/home/vhosts/some_domain/httpdocs>
    php_admin_value upload_max_filesize "20M"
    </Directory>



    and restart client apache from Plesk.
     
  10. twold

    twold Guest

    0
     
    AFAIK, effective user should be the owner of the zope-instance, not owner of the site (which is different, as I have just one global zope).

    And what about the bit about servers? That should be left untouched, shouldn't it?

    Well, be that as it may, I still didn't manage to get rid of the permission denied error.
    Any hints left? :)
     
  11. twold

    twold Guest

    0
     
  12. twold

    twold Guest

    0
     
    Btw, have you any zope sites running right now? ..Could you show me that it can work through apache, because I am starting to be quite desperate :)
     
  13. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    I only have


    test sites

    proof of concept sites

    and develop sites

    I will PM you .

    TIA.
     
Loading...