我正在尝试根据A2Hosting上的本教程在共享主机上运行nodejs应用程序并成功安装node / npm:
我现在正在将NODE.JS应用程序与Web服务器部分集成在一起,当我将重写规则复制到.htaccess文件时,它将在根域而不是wordpress网站上运行该节点。这是我的.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# BEGIN Node
# RewriteRule ^$ http://127.0.0.1:49876/ [P,L]
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)$ http://127.0.0.1:49876/$1 [P,L]
# END Node
我希望nodejs应用程序可以在subdomain之类的子域上运行:subdomain.domain.com,并保持wordpress在domain.com上运行
我应该对nodejs重写规则进行哪些更改以使其在子域上运行。