apache2 虚拟站点无法访问

apache2 虚拟站点无法访问

我正在设置 Bloodhound Web 应用程序,一切运行正常,我想使用官方指南,但是 apache 没有监听我指定的端口(尝试过 8081 和 8082)我使用浏览器/telnet/netstat 进行了测试,并且在日志中没有收到任何错误。

它在 Debian Wheezy 上运行

/etc/apache2/sites-available/bloodhound

 <VirtualHost *:8081>
   WSGIDaemonProcess bh_tracker user=tmbloodhound python-path=/home/tmbloodhound/apache-bloodhound-0.7/installer/lib/python2.7/site-packages
   WSGIScriptAlias /bloodhound /home/tmbloodhound/apache-bloodhound-0.7/installer/site/cgi-bin/trac.wsgi
   <Directory /home/tmbloodhound/apache-bloodhound-0.7/installer/site/cgi-bin>
     WSGIProcessGroup bh_tracker
     WSGIApplicationGroup %{GLOBAL}
     Order deny,allow
     Allow from all
   </Directory>
   <LocationMatch "/bloodhound/[^/]+/login">
     AuthType Digest
     AuthName "Bloodhound"
     AuthDigestDomain /bloodhound
     AuthUserFile /home/tmbloodhound/apache-bloodhound-0.7/installer/environments/main/bloodhound.htdigest
     Require valid-user
   </LocationMatch>
 </VirtualHost>

apache2ctl -S => apache 知道该站点

apache2: Could not reliably determine the server's fully qualified domain name, using aaa.bbb.ccc.ddd for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:8081                 aaa.bbb.ccc.ddd (/etc/apache2/sites-enabled/bloodhound:1)
*:80                   is a NameVirtualHost
         default server aaa.bbb.ccc.ddd (/etc/apache2/sites-enabled/000-default:1)
         port 80 namevhost aaa.bbb.ccc.ddd (/etc/apache2/sites-enabled/000-default:1)
Syntax OK

netstat -i => 看起来 appache 根本没有监听 8081。

root@chronis2:~# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:mysql         *:*                     LISTEN
tcp        0      0 localhost:submission    *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 localhost:smtp          *:*                     LISTEN
tcp6       0      0 localhost:8005          [::]:*                  LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:http-alt           [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
udp        0      0 *:mdns                  *:*
udp        0      0 *:36676                 *:*
udp6       0      0 [::]:mdns               [::]:*
udp6       0      0 [::]:57632              [::]:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     1614614872 /var/run/avahi-daemon/socket
unix  2      [ ACC ]     STREAM     LISTENING     1614614831 /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     1614614721 /var/run/apache2/wsgi.17360.0.1.sock
unix  2      [ ACC ]     STREAM     LISTENING     1614615680 /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     STREAM     LISTENING     1614638717 /var/run/sendmail/mta/smcontrol

答案1

您是否编辑了 /etc/apache2/ports.conf 并添加那里有部分?

收听 8081

相关内容