我怎样才能解决这个问题?
我正在使用另一个EC2实例的图像的Amazon EC2:
ubuntu@ip:~/LabelMeAnnotationTool-master$ sudo apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-bin apache2-data Suggested packages: apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils The following packages will be upgraded: apache2 apache2-bin apache2-data 3 upgraded, 0 newly installed, 0 to remove and 269 not upgraded. Need to get 1,092 kB of archives. After this operation, 18.4 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2 amd64 2.4.7-1ubuntu4.17 [87.4 kB] Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-bin amd64 2.4.7-1ubuntu4.17 [845 kB] Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2-data all 2.4.7-1ubuntu4.17 [160 kB] Fetched 1,092 kB in 0s (22.3 MB/s) (Reading database ... 96282 files and directories currently installed.) Preparing to unpack .../apache2_2.4.7-1ubuntu4.17_amd64.deb ... Unpacking apache2 (2.4.7-1ubuntu4.17) over (2.4.7-1ubuntu4.8) ... Preparing to unpack .../apache2-bin_2.4.7-1ubuntu4.17_amd64.deb ... Unpacking apache2-bin (2.4.7-1ubuntu4.17) over (2.4.7-1ubuntu4.8) ... Preparing to unpack .../apache2-data_2.4.7-1ubuntu4.17_all.deb ... Unpacking apache2-data (2.4.7-1ubuntu4.17) over (2.4.7-1ubuntu4.8) ... Processing triggers for ureadahead (0.100.0-16) ... Processing triggers for ufw (0.34~rc-0ubuntu2) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up apache2-bin (2.4.7-1ubuntu4.17) ... Setting up apache2-data (2.4.7-1ubuntu4.17) ... Setting up apache2 (2.4.7-1ubuntu4.17) ... Installing new version of config file /etc/apache2/mods-available/mpm_prefork.load ... Installing new version of config file /etc/apache2/mods-available/mpm_event.load ... Installing new version of config file /etc/apache2/mods-available/mpm_worker.load ... * Restarting web server apache2 [fail] * The apache2 configtest failed. Output of config test was: AH00526: Syntax error on line 61 of /etc/apache2/sites-enabled/000-default.conf: SSLCertificateFile: file '/etc/apache2/ssl/d288922d35efb1b0.crt' does not exist or is empty Action 'configtest' failed. The Apache error log may have more information. invoke-rc.d: initscript apache2, action "restart" failed. ubuntu@ip:~/LabelMeAnnotationTool-master$ sudo ^C ubuntu@ip:~/LabelMeAnnotationTool-master$ apache2ctl configtest AH00526: Syntax error on line 61 of /etc/apache2/sites-enabled/000-default.conf: SSLCertificateFile: file '/etc/apache2/ssl/d288922d35efb1b0.crt' does not exist or is empty Action 'configtest' failed. The Apache error log may have more information.
我试图按照本教程第2页末尾的说明操作: http : //cs-people.bu.edu/sameki/blog1.pdf
SSLCertificateFile: file '/etc/apache2/ssl/d288922d35efb1b0.crt' does not exist or is empty Action 'configtest' failed.
你错过了一个crt文件。 你应该去原始的ec2实例,find这个文件,然后SCP把它放到你最近的实例中。
从godaddy下载标准SSL证书后,我不得不更新sudo vi /etc/apache2/sites-enabled/000-default.conf的.crt和.key。
现在我得到:
~$ apache2ctl configtest Syntax OK