我在同一个apache容器中有两个php应用程序,我试图在一个端口上运行其中一个,因为它需要通过根域而不是子文件夹进行访问.
我想在端口8060上运行应用程序,我已经try 过使用apache虚拟主机,但它不会加载页面(http://192.168.99.100:8060/),它只是说连接被拒绝.然而,正常的根ip-http://192.168.99.100工作正常.
version: '3.2'
services:
php-apache:
build:
context: ./apache-php
ports:
- 80:80
- 8060:8060
expose:
- '8060'
volumes:
- ./DocumentRoot:/var/www/html:z
我的apache配置
<VirtualHost *:60>
DocumentRoot /var/www/html/api
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
任何帮助都将不胜感激.