• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Issue How to configure the WordPress and Nodejs together on a single domain?

piyushmittal

New Pleskian
Hi all,

I am working on two different projects, one project is in Nodejs, and the other is in WordPress and I am trying to deploy both projects together with the use of Plesk panel on a single domain. We want our node project should run on <our_domain>/ and if we got to <our_domain>/blog then we want to run the WordPress project. We successfully configured Node project on <our_domin>/ and then we created a blog directory inside of our node project public folder and then we migrated our whole WordPress code into the blog directory but when we try to go on <our_domain>/blog instead of opening the WordPress website blog page we got redirected to <our_domian>/. And we don't have any idea why this is happening.

We are using:
  • Apache.
  • NodeJs 14.
  • PHP version 7.4.27.
If anyone knows how to solve this problem please reply in this thread.

Thanks
 
I found a solution after digging through the inner workings of the plesk apache and nginx config

It's pretty straightforward, configure your nodejs application like it was your main app, enable php

Thrn in the Web hosting settings of Apache, for https add this (replace yourpath_to_wp_dir and your_domain.example.com):

Apache config:
Alias /blog /var/www/vhosts/yourpath_to_wp_dir

<Directory /var/www/vhosts/yourpath_to_wp_dir>
    <IfModule mod_proxy_fcgi.c>
        <Files ~ (\.php$)>
            SetHandler proxy:unix:/var/www/vhosts/system/your_domain.example.com/php-fpm.sock|fcgi://127.0.0.1:9000
        </Files>
    </IfModule>

    SSLRequireSSL

    Options -Includes -ExecCGI
</Directory>


And that's all there is to it, your node app is served at the root and /blog serves the wordpress php app
 
Back
Top