• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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