0
votes

After adding a self-signed SSL certificate, I am unable to get my Drupal site to work on localhost.

I have attempted various proposed solutions that I have found online but none have gotten me past a 400 error at https://localhost/

I have uncommented the following in httpd.conf:

LoadModule ssl_module modules/mod_ssl.so

I have Listen set to port 80 in this same file. When I set it to the SSL channel, 443, Apache does not load.

In my httpd-ssl.conf file:

I have set the paths for my server.crt and server.key files correctly.

I have enabled SSLEngine

    <VirtualHost *:443>

    #   General setup for the virtual host
    DocumentRoot "/Applications/MAMP/Library/htdocs"
    ServerName https://127.0.0.1:443
    ServerAdmin [email protected]
    ErrorLog "/Applications/MAMP/Library/logs/error_log"
    TransferLog "/Applications/MAMP/Library/logs/access_log"

I have tried a variety of possibilities for the ServerName. The one above along with localhost:443 both lead to 400 errors.

I have Listen set to 443 here. Setting to 80 so it matches the httpd.conf file leads to the same result described above...not able to connect Apache.

Here is my error log for Apache:

Digest: generating secret for digest authentication ... Digest: done FastCGI: process manager initialized (pid 1845) Apache/2.2.34 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.2.14 mod_ssl/2.2.34 OpenSSL/1.0.2o DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.9 Perl/v5.24.0 configured -- resuming normal operations [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store, referer: http://localhost/MAMP/?language=English [error] [client 127.0.0.1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store, referer: http://localhost/MAMP/?language=English [notice] caught SIGTERM, shutting down

I don't know enough about Apache server configuration to figure out, when I start MAMP to be able to navigate with HTTPS to my Drupal project, which is in the HTDOCs file and make it run without the 400 error.

1

1 Answers

0
votes

I solved the problem by commenting out the line "Document root" above in the virtual host section.