Apache ServerName 被忽略

Apache ServerName 被忽略

Apache 似乎忽略了特定虚拟主机的 ServerName。我已发布 apachectl -S 的输出:

VirtualHost configuration:
81.145.239.71:80       www.actualvirtual.co.uk (/opt/bitnami/apache2/conf/extra/httpd-vhosts.conf:23)
         port 80 namevhost crmdev.actualvirtual.co.uk (/opt/bitnami/apps/suitecrm/conf/httpd-vhosts.conf:1)
*:80                   localhost (/opt/bitnami/apache2/conf/bitnami/bitnami.conf:8)
*:443                  is a NameVirtualHost
         default server crmdev.actualvirtual.co.uk (/opt/bitnami/apps/suitecrm/conf/httpd-vhosts.conf:7)
         port 443 namevhost crmdev.actualvirtual.co.uk (/opt/bitnami/apps/suitecrm/conf/httpd-vhosts.conf:7)
         port 443 namevhost localhost (/opt/bitnami/apache2/conf/bitnami/bitnami.conf:55)

如您所见,它正确地提取了配置文件,但它忽略了 crmdev.actualvirtual.co.uk ServerName 指令。虚拟主机的配置如下:

<VirtualHost 81.145.239.69:80>
    ServerName crmdev.actualvirtual.co.uk
    DocumentRoot "/opt/bitnami/apps/suitecrm/htdocs"
    Include "/opt/bitnami/apps/suitecrm/conf/httpd-app.conf"
</VirtualHost>

httpd-app.conf 有:

<IfDefine USE_PHP_FPM>
  <Proxy "unix:/opt/bitnami/php/var/run/suitecrm.sock|fcgi://suitecrm-fpm" timeout=300>
  </Proxy>
</IfDefine>

<Directory "/opt/bitnami/apps/suitecrm/htdocs">
  Options +MultiViews
  AllowOverride All
  <IfVersion < 2.3 >
      Order allow,deny
      Allow from all
  </IfVersion>
  <IfVersion >= 2.3>
      Require all granted
  </IfVersion>


  <IfModule php5_module>
     php_value upload_max_filesize 60M
     php_value post_max_size 60M
     php_value memory_limit 256M

  </IfModule>

  <IfDefine USE_PHP_FPM>
    <IfModule pagespeed_module>
      ModPagespeed off
    </IfModule>

    <FilesMatch \.php$>
     SetHandler "proxy:fcgi://suitecrm-fpm"
    </FilesMatch>
  </IfDefine>

</Directory>

相关内容