Hi, I am trying to figure out how to best serve a PHP app on the same server as my Rails app. Basically, the PHP app is a 3rd party blog that I want to be able to access on the same server. The server is powered by mongrel cluster and apache. I tried putting the blog in /public but then /blog/login does not work, while /blog/login.php does. Anyway what is the best way to solve this? -- Posted via http://www.ruby-forum.com/.
On Mon, Sep 28, 2009 at 6:13 PM, Greg Lazarev <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am trying to figure out how to best serve a PHP app on the same server > as my Rails app. Basically, the PHP app is a 3rd party blog that I want > to be able to access on the same server. The server is powered by > mongrel cluster and apache. I tried putting the blog in /public but then > /blog/login does not work, while /blog/login.php does. Anyway what is > the best way to solve this?I''d set each app up on it''s own subdomain. But if you can''t you can use mod_rewrite to sort out where requests should go. http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html -- Greg Donald http://destiney.com/
Greg Donald wrote:> On Mon, Sep 28, 2009 at 6:13 PM, Greg Lazarev > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> I am trying to figure out how to best serve a PHP app on the same server >> as my Rails app. Basically, the PHP app is a 3rd party blog that I want >> to be able to access on the same server. The server is powered by >> mongrel cluster and apache. I tried putting the blog in /public but then >> /blog/login does not work, while /blog/login.php does. Anyway what is >> the best way to solve this? > > I''d set each app up on it''s own subdomain. But if you can''t you can > use mod_rewrite to sort out where requests should go. > > http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html > > > -- > Greg Donald > http://destiney.com/I agree that subdomain would be great. However when I set up blog.mysite.com all of the links still point to mysite.com/blog instead of blog.mysite.com/blog. Is it because I set up the subdomain wrong or is it because mongrel is doing something here? -- Posted via http://www.ruby-forum.com/.
I would assume that you are using passenger... Just setup the rails app like normal then create a locations element for the blog and turn off rails for this directory And here is the cut''n paste from the Passenger documentation <VirtualHost *:80> ServerName www.foo.com DocumentRoot /apps/foo/public <Directory /apps/foo/public/wordpress> PassengerEnabled off AllowOverride all # <-- Makes Wordpress''s .htaccess file work. </Directory> </VirtualHost>
Greg Lazarev wrote:> Hi, > > I am trying to figure out how to best serve a PHP app on the same server > as my Rails app. Basically, the PHP app is a 3rd party blog that I want > to be able to access on the same server. The server is powered by > mongrel cluster and apache. I tried putting the blog in /public but then > /blog/login does not work, while /blog/login.php does. Anyway what is > the best way to solve this? >I personally just use a different sub-domain. Cheers, Mohit. 9/29/2009 | 9:02 AM.
> > I agree that subdomain would be great. However when I set up > blog.mysite.com all of the links still point to mysite.com/blog instead > of blog.mysite.com/blog. Is it because I set up the subdomain wrong or > is it because mongrel is doing something here?If you are using WP (but I think is the same for most blogging platform) you need to reinstall the blog engine , you cannot just move from one address to another In WP there is a way to change the base blog_url but is easier and safer to just export , reinstall and import. -- Posted via http://www.ruby-forum.com/.
heimdull wrote:> I would assume that you are using passenger... > > Just setup the rails app like normal then create a locations element > for the blog and turn off rails for this directory > > And here is the cut''n paste from the Passenger documentation > > <VirtualHost *:80> > ServerName www.foo.com > DocumentRoot /apps/foo/public > <Directory /apps/foo/public/wordpress> > PassengerEnabled off > AllowOverride all # <-- Makes Wordpress''s .htaccess file > work. > </Directory> > </VirtualHost>I''m using mongrel cluster behind Apache. It is a WP blog. I''m on MediaTemple host and the way they set it up there is no DocumentRoot specified in httpd.conf. Is there anyway to tell Apache not to send the request to mongrel (like PassengerEnabled)? -- Posted via http://www.ruby-forum.com/.
http://kb.mediatemple.net/questions/279/Ruby+on+Rails+using+Mongrel+Clusters It looks like there''s a part about setting up your vhost.conf. Did you go through these steps? If so, I''d guess that it''s the place you want to make your edits to exclude blog URL from being redirected. On Sep 28, 8:37 pm, Greg Lazarev <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> heimdull wrote: > > I would assume that you are using passenger... > > > Just setup the rails app like normal then create a locations element > > for the blog and turn off rails for this directory > > > And here is the cut''n paste from the Passenger documentation > > > <VirtualHost *:80> > > ServerNamewww.foo.com > > DocumentRoot /apps/foo/public > > <Directory /apps/foo/public/wordpress> > > PassengerEnabled off > > AllowOverride all # <-- Makes Wordpress''s .htaccess file > > work. > > </Directory> > > </VirtualHost> > > I''m using mongrel cluster behind Apache. It is a WP blog. I''m on > MediaTemple host and the way they set it up there is no DocumentRoot > specified in httpd.conf. Is there anyway to tell Apache not to send the > request to mongrel (like PassengerEnabled)? > -- > Posted viahttp://www.ruby-forum.com/.