无法通过端口访问本地站点(Apache)

vm0i2vca  于 2022-11-16  发布在  Apache
关注(0)|答案(1)|浏览(290)

我已经在Apache中设置了端口81到86来从Windows或我的手机访问我的本地站点,它们工作正常,但任何其他端口都会出现403错误。
httpd.conf文件:

LISTEN 81
LISTEN 82
LISTEN 83
LISTEN 84
LISTEN 85
LISTEN 86
LISTEN 8080

除了端口81到86以外的端口都不能工作。我已经允许端口通过ESET防火墙,我的httpd-vhosts.conf在按钮处看起来像这样:

# site 7 in SSL:
 <VirtualHost *:8080>
     DocumentRoot "D:/some/address/here"
     ServerName site.test
     ServerAlias *.site.test
     SSLEngine on
     SSLCertificateFile "crt/site.test/server.crt"
     SSLCertificateKeyFile "crt/site.test/server.key"
     <Directory "D:/some/address/here">
       Require all granted
       AllowOverride All
     </Directory>
 </VirtualHost>
nuypyhwy

nuypyhwy1#

DocumentRoot "D:/some/address/here"下,将下面一行添加到我的“httpd-vhosts.conf”文件中,修复了该问题:

<Directory "D:/some/address/here">
  Require all granted
  AllowOverride all
</Directory>

对我来说唯一奇怪的事情是,为什么端口81到86不需要httpd-vhosts.conf文件中的这段代码...

相关问题