admin管理员组

文章数量:1403446

I'm running WAMP for a local dev machine, and I have everything configured for a couple of vhosts to run on a self-signed SSL.

The sites are actually loading just fine on https:// and I can browse them successfully, but WAMP is displaying these errors:

Notice that it's telling me 443 is not a listening port for the vhosts (even though it is and it's running fine), and it's also telling me that I have duplicate entries for the server names. I do, but one is for 80 and one is for 443, which seems correct based on everything I'm finding.

Here's a look at my vhosts config:

<VirtualHost _default_:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

# HTTP (Redirect to HTTPS)
<VirtualHost *:80>
    ServerName wp.localhost
    DocumentRoot "C:/wamp64/www/wp"

    <Directory "C:/wamp64/www/wp/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>

    # Redirect HTTP to HTTPS
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</VirtualHost>

# HTTPS
<VirtualHost *:443>
    ServerName wp.localhost
    DocumentRoot "C:/wamp64/www/wp"

    SSLEngine on
    SSLCertificateFile "${SRVROOT}/conf/mycert.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/mypriv.key"

    <Directory "C:/wamp64/www/wp/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>


## Faith, Fitness and Finance
# Local Development (Accessible Only on This Machine)
<VirtualHost *:80>
    ServerName fff.localhost
    DocumentRoot "C:/wamp64/www/faith-fitness-finance/public"

    <Directory "C:/wamp64/www/faith-fitness-finance/public/">
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog "C:/wamp64/logs/fff.local-error.log"
    CustomLog "C:/wamp64/logs/fff.local-access.log" combined
</VirtualHost>

# HTTPS
<VirtualHost *:443>
    ServerName fff.localhost
    DocumentRoot "C:/wamp64/www/faith-fitness-finance/public"

    SSLEngine on
    SSLCertificateFile "${SRVROOT}/conf/mycert.crt"
    SSLCertificateKeyFile "${SRVROOT}/conf/mypriv.key"

    <Directory "C:/wamp64/www/wp/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

I have seen some info that WAMP may not properly parse info out of httpd-ssl.conf, so I tried moving the "Listen 443" line from there to the main httpd.conf, but that gives me the same result.

Everything else I'm finding just tells me to double check all the config settings to ensure SSL is enabled in Apache, but again, it is, and it's running perfectly fine. I could just ignore the errors, but that's hard for me to do. I like a clean dashboard.

For the duplicate server name errors I found I should use ServerAlias instead of ServerName for the 443 blocks. This gets rid of those duplicate errors, but then replaces them with errors about mismatched vhost and server blocks.

本文标签: apacheWAMP Dashboard showing errors when everything is working fineStack Overflow