首页 > 解决方案 > 是否可以在同一 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>

标签: asp.networdpressapache

解决方案


推荐阅读