我正在开发node.js应用程序,并希望在apache服务器上部署并仅使用https url运行。
我想在服务器上配置以下网址方案。
https://example.com在 / home / main / public_html / 目录的 1000 端口上运行节点js应用程序。 https://example.com:1335从 / home / main / public_html / stagging / 目录运行node js应用程序。 https://example.com:4234从 / home / main / public_html / development / 目录运行node js应用程序。
我想从服务器上实现这种类型的url输出。
我尝试了以下方法来实现此功能,但它仅显示目录列表。我想执行nodejs应用程序。
<VirtualHost *:80>
ServerAdmin webmaster@domain.com
ServerName sub.domain.com
ProxyRequests Off
#Executes code from main directory
<Proxy https://whizbite.com:1000>
Order deny,allow
Allow from all
ProxyPreserveHost off
ProxyPass https://localhost:8080/
ProxyPassReverse https://localhost:8080/
</Proxy>
#Executes code from staging directory
<Proxy https://whizbite.com:1335>
Order deny,allow
Allow from all
ProxyPreserveHost off
ProxyPass https://localhost:8080/staging/
ProxyPassReverse https://localhost:8080/staging/
</Proxy>
#Executes code from development directory
<Proxy https://whizbite.com:4234>
Order deny,allow
Allow from all
ProxyPreserveHost off
ProxyPass https://localhost:8080/development/
ProxyPassReverse https://localhost:8080/development/
</Proxy>
</VirtualHost>
我真的不知道如何通过修改apache配置来实现上面的url方案。