asp.net - 是否可以在同一 Apache 服务器和具有不同子域的同一端口上运行 .net 应用程序和 wordpress 博客?
问题描述
今天我的 apache 正在运行两个应用程序,一个在 .net 中,一个在 wordpress 博客中,.net 应用程序在端口 81 上,wordpress 在 80 端口上,我想知道我是否知道如何将两个应用程序放在同一个端口上,只改变域。
例如:/博客->
Wordpress / -> .net 应用程序
以下是两个应用程序的配置文件:
.net 应用程序:
<VirtualHost *:81>
ServerName www.example.com
ProxyPreserveHost On
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /(.*) ws://127.0.0.1:5000/$1 [P]
ErrorLog ${APACHE_LOG_DIR}/error-webnix.com.log
CustomLog ${APACHE_LOG_DIR}/access-webnix.com.log combined
</VirtualHost>
WordPress:
<Directory /var/www/wordpress/>
AllowOverride All
</Directory>
解决方案
推荐阅读
- javascript - 当另一个 div 悬停时,CSS 更改单独 div 的背景颜色
- angular-material - Angular Material:如何在用户浏览垫子自动完成中的垫子选项时捕获事件?
- kubernetes - Kubernetes Metric Server 无法收集 Metric
- node.js - mongoose collection.find 多次执行 - 进入条件和 if 语句
- azure - Azure AD B2C - SAML IDP 技术配置文件 - 禁用签名
- docker - Lando 的 mysql 数据库 docker 服务被杀死,没有错误
- python - 无法使用 selenium python 打印图像链接
- android - Google Play 控制台中的内部应用共享显示“发生意外错误”
- amazon-web-services - aws cloudfront - 使用 S3 拒绝访问
- excel - 如果满足条件到另一个工作表的不同区域,我如何使用 VBA 代码复制和粘贴特定单元格