[Cubicweb] Cubicweb Digest, Vol 13, Issue 4

Carlos Balderas carlos.balderas at gmail.com
Tue Mar 9 22:57:09 CET 2010


Thank you Florent, you helped me a lot.

I followed your indications and I got the application working.

Notes:
*** If somebody else is following this topic please be aware of these things

1.- use these rewrite rules to achive the result:
RewriteCond %{REQUEST_URI} ^/myfolder
RewriteRule ^/myfolder$ /myfolder/
RewriteRule ^/myfolder/(.*) http://127.0.0.1:8080/$1 [L,P]

2.- in the file all-in-one.conf of your instance use:
base-url = http://mydomain/myfolder/ <http://mydomain/forge>

3.- in case of getting an authentication failure when trying to access your
instance of cubicweb, try cleaning the cookies of your browser.

Best Regards
Carlos Balderas

On Sun, Mar 7, 2010 at 5:00 AM, <cubicweb-request at lists.cubicweb.org> wrote:

> Send Cubicweb mailing list submissions to
>        cubicweb at lists.cubicweb.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.cubicweb.org/mailman/listinfo/cubicweb
> or, via email, send a message with subject or body 'help' to
>        cubicweb-request at lists.cubicweb.org
>
> You can reach the person managing the list at
>        cubicweb-owner at lists.cubicweb.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Cubicweb digest..."
>
>
> Today's Topics:
>
>   1. rewriterule and base-url (Carlos Balderas)
>   2. Re: rewriterule and base-url (Florent Cayr?)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 6 Mar 2010 16:31:04 -0600
> From: Carlos Balderas <carlos.balderas at gmail.com>
> Subject: [Cubicweb] rewriterule and base-url
> To: cubicweb at lists.cubicweb.org
> Message-ID:
>        <cafa12b91003061431r7d89082el9889d97d743871fc at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi everyone, I am changing the url of my application (forge) from
> http://mydomain:8080/ to http://mydomain/forge (for instance).
>
> What I am doing is:
>
> 1.- Enable rewrite module in our apache2 server (tested with Redirect
> command)
> 2.- Write the .htaccess file in /var/www/ path
> 3.- Put this lines in there
>
> RewriteCond %(REQUEST_URI) ^/forge
> RewriteRule ^/forge$ /forge/
> RewriteRule ^/forge/(.*) http://127.0.0.1:8080/$1 [L,P]
>
> based on this link
>
> http://www.cubicweb.org/doc/en/admin/instance-config.html?highlight=rewritecond
>
> 4.- change my all-in-one.conf file
> main.base-url = http://mydomain/forge
>
> but I don't get it to work...
>
> Any help will be very appreciated
> Thank you very much
> Carlos Balderas
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.cubicweb.org/pipermail/cubicweb/attachments/20100306/36417b0f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Sun, 7 Mar 2010 09:56:00 +0100
> From: Florent Cayr? <florent at secondweb.fr>
> Subject: Re: [Cubicweb] rewriterule and base-url
> To: Carlos Balderas <carlos.balderas at gmail.com>
> Cc: cubicweb at lists.cubicweb.org
> Message-ID:
>        <dbf017781003070056x23c08e96h610cc7955777881c at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Carlos,
>
> not sure you have everything in place to get the documented rules working
> here :
>
> * use a virtualhost to put the rules in, like (do not forget to
> activate it with a2ensite my_virtualhost) ::
>
>  <VirtualHost *:80>
>
>    ServerName mydomain.com
>
>    ErrorLog /var/log/apache2/mydomain.log
>    LogLevel warn
>    CustomLog /var/log/apache2/mydomain.log combined
>
>    RewriteEngine On # this one is important !
>    RewriteLog /var/log/apache2/mydomain_rewrite.log
>    RewriteLogLevel 3 # remove this as soon as debugged otherwise it
> will fill your disk in quickly
>
>    ProxyPreserveHost On # use this to preseve host if you use it in
> your cw instance (particularly useful if you have distinct subdomains
> handled by a single cw instance) ; anyway it can not hurt
>
>    # YOUR RULES GO HERE (I just copied yours without checking - read
> the above configured rewrite log to debug them)
>    RewriteCond %(REQUEST_URI) ^/forge
>    RewriteRule ^/forge$ /forge/
>    RewriteRule ^/forge/(.*) http://127.0.0.1:8080/$1 [L,P]
>
>  </Virtualhost>
>
> * do not forget to activate the rewrite and proxy_http modules (with
> a2enmod rewrite ; a2enmod proxy_http) and to configure the proxy
> module with something like "Allow from all" (please make sure you know
> what you are doing here).
>
> * then restart apache2 with /etc/init.d/apache2 restart
>
> Hope it helps,
> Regards,
> Florent.
>
>
> 2010/3/6 Carlos Balderas <carlos.balderas at gmail.com>
> >
> > Hi everyone, I am changing the url of my application (forge) from
> http://mydomain:8080/ to http://mydomain/forge (for instance).
> >
> > What I am doing is:
> >
> > 1.- Enable rewrite module in our apache2 server (tested with Redirect
> command)
> > 2.- Write the .htaccess file in /var/www/ path
> > 3.- Put this lines in there
> >
> > RewriteCond %(REQUEST_URI) ^/forge
> >
> > RewriteRule ^/forge$ /forge/
> > RewriteRule ^/forge/(.*) http://127.0.0.1:8080/$1 [L,P]
> >
> > based on this link
> >
> http://www.cubicweb.org/doc/en/admin/instance-config.html?highlight=rewritecond
> >
> >
> >
> > 4.- change my all-in-one.conf file
> > main.base-url = http://mydomain/forge
> >
> > but I don't get it to work...
> >
> > Any help will be very appreciated
> > Thank you very much
> > Carlos Balderas
> >
> > _______________________________________________
> > Cubicweb mailing list
> > Cubicweb at lists.cubicweb.org
> > http://lists.cubicweb.org/mailman/listinfo/cubicweb
> >
>
>
>
> --
> Ce message est la propri?t? de SecondWeb et peut contenir des
> informations confidentielles. Si vous n'?tes pas le destinataire
> d?sign?, nous vous remercions de bien vouloir nous en aviser
> imm?diatement et de nous retourner ce message ou de le d?truire, sans
> faire un quelconque usage de son contenu, ni le communiquer ou le
> diffuser, ni en prendre copie, ?lectronique ou non.
>
> This message is the property of SecondWeb and may contain confidential
> information. If you are not the designated recipient, please notify us
> immediately and return the message to us or destroy it, without making
> any use whatsoever of the contents thereof. Furthermore you should not
> forward or copy the message by electronic or other means.
>
>
> ------------------------------
>
> _______________________________________________
> Cubicweb mailing list
> Cubicweb at lists.cubicweb.org
> http://lists.cubicweb.org/mailman/listinfo/cubicweb
>
>
> End of Cubicweb Digest, Vol 13, Issue 4
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20100309/1825dbe4/attachment-0126.html>


More information about the Cubicweb mailing list