How do I Create a Node.js proxy server routing to Wordpress(apache)?

Posted December 21, 2016 4k views

Hey Everyone,

I was reading this article about an interesting server setup ->

I’m wondering what do I need to do in order to set something like this up? Are there any tutorials on here that fit that description? Any help in figuring out this server setup would be awesome!


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


There isn’t any tutorial on DO talking about routing React/WP app.

If you didn’t already saw, at bottom of above post, there is source code for sample app.
Referencing above article and source code can be helpful to build same setup.

However, this would require better Node.js, JS, WP/PHP knowledge so you can understand above code. :)
If you need help with any part, feel free to ask, maybe someone will come with solution. ;)

  • Ok I will definitely keep searching to find out more about there code base. My next question is where can I go to learn how to setup a node.js proxy to an apache server? I’m having hard time finding a good walkthrough on this…

    • I know you’re having hard time finding a good tutorial. It’s not something you’ll see frequently. Usually, you’ll find how to make reverse proxy so Apache serves your app. As there isn’t direct tutorial, you’ll have to analyze part by part.

      The point of set up you want is rendering. You want to send request to Node.js server for specific pages. When it receive request, it should render page server-side and return it to you. So what you want - web page parsing using Node.js. If you’re new to Node, start with basics. Learn how it works, build sample server that return Hello, World!. If you have idea for something more complex, just do it.
      When you see Hello, World!, it means that you parsed basic HTML code. That’s just beginning. Learn how to do it for file then how to do it from Apache (by making HTTP request).

      That’s basic step to get you into Node world if you are new to it. After this look more at source code and try to find how to parse JavaScript and render it.
      When you do this, you basically have setup you want.

      • Ok I will start there with basic Node.js - I am definitly new to node so a great area to start in. Maybe I will answer my one question once I get more familiar with Node and rendering + http requests.

        Thanks so much xMurdii.