0

I am trying to setup a locally (for development/testing purposes) SSL site using Apache and mod_ssl and this is what I have in my VirtualHost files:

/etc/httpd/conf.d/local.conf
<VirtualHost *:80>
    ServerName reptool.dev

    DocumentRoot /var/www/html/magnific/reptooln_admin/web
    <Directory /var/www/html/magnific/reptooln_admin/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>

    ErrorLog /var/log/httpd/reptool-error.log
    CustomLog /var/log/httpd/reptool-access.log combined
</VirtualHost>

/etc/httpd/conf.d/local-ssl.conf
<VirtualHost reptool.dev:443>
    ServerName reptool.dev:443

    DocumentRoot /var/www/html/magnific/reptooln_admin/web
    <Directory /var/www/html/magnific/reptooln_admin/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>

    ErrorLog /var/log/httpd/reptool-error.log
    CustomLog /var/log/httpd/reptool-access.log combined

    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/ca.crt
    SSLCertificateKeyFile /etc/pki/tls/private/ca.key
</VirtualHost>

The first (the non-SSL) works just fine but with the SSL one I got not error 404:

The requested URL /app_dev.php was not found on this server.

Why? What I am missing at configuration level?

ReynierPM
  • 710
  • 5
  • 14
  • 30

1 Answers1

0

Your ServerName "reptool.dev:443" doesn't look right to me, it should not have the port in it. Try:

ServerName reptool.dev
Dan Armstrong
  • 821
  • 4
  • 6
  • Didn't work, still the same issue: 404 Not found – ReynierPM May 01 '15 at 20:38
  • Try making a different log to see if requests are being picked-up by the HTTPS server: CustomLog /var/log/httpd/reptool-access-https.log combined Are you confident your ServerName matches your incoming requests? – Dan Armstrong May 01 '15 at 20:41
  • Request are not beeing made to that URL I mean I can't see anything in logs, why? – ReynierPM May 01 '15 at 20:52
  • Did you include your Listen and NameVirtualHost directives for port 443? Listen 192.168.0.1:443 NameVirtualHost 192.168.0.1:443 – Dan Armstrong May 01 '15 at 21:03
  • I have in this way: `NameVirtualHost *:80 NameVirtualHost *:443` but that cause this error `Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:443` during HTTPD restart – ReynierPM May 01 '15 at 21:11