简体   繁体   中英

How do I integrate WordPress blogs with my Grails application?

I had my static site with which WordPress blogs were integrated. Now I have made a Grails application with which I want to integrate those WordPress blogs.

I had put the WordPress folder copied from my previous site to the web-app folder of my Grails application. But I am not able to access the WordPress folder, as when I hit URL - http://localhost:8080/myApplicaiton/wordpress/ , it shows this error:

Error 500: java.net.SocketTimeoutException: Read timed out

Also, in my urlMappings.groovy one of the mappings I need is

"/$generalPageURL"(controller:'myConroller', action:'myAction')

And if I put in the above mapping, all requests for WordPress goes to myAction of myController . Is there any way out to still reach the WordPress folder defined inside web-app folder with the above mapping?

This may sound silly, but your WordPress blog need PHP in order to run. You maybe better off using an HTTP server like Apache with PHP on the front and use either a mod_proxy or mod_jk type of configuration to connect the two applications (Grails and WordPress) together. That way your users can see http://www.yoursite.com/wordpress and http://www.yoursite.com/grailssite , with the HTTP requests being handled by Apache and then have it pass the Grails part off to Jetty / GlassFish or whatever you are using.

我认为您需要以相反的顺序apache来重定向到php网站,而不是grails来重定向到apache服务器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM