Apache2不能在Ubuntu AH02240中启动:服务器应该支持SSL,但没有配置证书

时间:2017-09-18 00:17:20

标签: apache ubuntu ssl amazon-ec2 apache2

我无法启动Apache2服务器。这是Ubuntu中Apache登录的尾部。我在Amazon EC2实例中运行Apache2。

$ tail -20  /var/log/apache2/error.log
[ 2017-09-18 00:03:43.1798 30648/7ff648f73780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.37', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '30647', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2017-09-18 00:03:43.1951 30651/7f1f13caa780 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.30647/generation-0/request
[ 2017-09-18 00:03:43.2176 30659/7f06d8575780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.30647/generation-0/logging
[ 2017-09-18 00:03:43.2178 30648/7ff648f73780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Mon Sep 18 00:03:43.218159 2017] [ssl:emerg] [pid 30647] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)
[Mon Sep 18 00:03:43.218199 2017] [ssl:emerg] [pid 30647] AH02312: Fatal error initialising mod_ssl, exiting.
[ 2017-09-18 00:03:43.2302 30659/7f06d8575780 agents/LoggingAgent/Main.cpp:289 ]: Caught signal, exiting...

这是我的配置文件:

$ cat /etc/apache2/sites-enabled/000-default.conf
WSGIDaemonProcess www-data
WSGIProcessGroup www-data
WSGIPythonPath /usr/local/lib/python2.7/site-packages

<VirtualHost *:443>
        ServerName www.buhcomp.com
        DocumentRoot /home/ubuntu/vatic/public

        WSGIScriptAlias /server /home/ubuntu/vatic/server.py
        CustomLog /var/log/apache2/access.log combined
<Directory /home/ubuntu/vatic/public>
Options +Indexes +FollowSymLinks +MultiViews +Includes +ExecCGI
AllowOverride all

AddHandler cgi-script .cgi .pl

Order allow,deny

Require all granted

Allow from all

AddType text/html .html

AddOutputFilter INCLUDES .html

DirectoryIndex index.html

</Directory>

</VirtualHost>

<VirtualHost *:443>



    DocumentRoot /home/ubuntu/LabelMeAnnotationTool-master



    SSLEngine on

    SSLOptions +StrictRequire



    <Directory />

        SSLRequireSSL

    </Directory>



    SSLProtocol -all +TLSv1 +SSLv3

    SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM



    SSLCertificateFile /etc/apache2/ssl/4757dc1c480db857.crt

    SSLCertificateKeyFile /etc/apache2/ssl/buhcomp_com.key



    SSLVerifyClient none

    SSLProxyEngine off

    <IfModule mime.c>

        AddType application/x-x509-ca-cert      .crt

        AddType application/x-pkcs7-crl         .crl

    </IfModule>

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>
<Directory /home/ubuntu/test/LabelMeAnnotationTool-master>
Options +Indexes +FollowSymLinks +MultiViews +Includes +ExecCGI
AllowOverride all

AddHandler cgi-script .cgi .pl

Order allow,deny

Require all granted

Allow from all

AddType text/html .shtml

AddOutputFilter INCLUDES .shtml

DirectoryIndex index.shtml

</Directory>
</VirtualHost>

我从GoDaddy网站下载了标准SSL证书:

$ ls -ltra /etc/apache2/ssl/
total 16
-rw-r--r-- 1 root root 1858 Sep 17 23:25 4757dc1c480db857.crt
-rw-r--r-- 1 root root 1704 Sep 17 23:29 buhcomp_com.key
drwxr-xr-x 2 root root 4096 Sep 17 23:29 .
drwxr-xr-x 9 root root 4096 Sep 17 23:46 ..

0 个答案:

没有答案