• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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