添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After 1.8 install, i recive this error: invalid number of arguments in "ssl_certificate" directive in /etc/nginx/conf.d/default_https.conf:43

I have checked the file and puts on each domain:
ssl_certificate ;
ssl_certificate_key ;

And so on, so not put the path to SSL cert file.

Thank you!

Wow, this is weird. Doesn't your server have any certificate issued yet?

What files do you see under /var/cpanel/ssl/cpanel/ using a terminal?

Just do this after you login as root in your server:

ls -l /var/cpanel/ssl/cpanel/*

-rw-rw----. 1 cpanel cpanel 2887 Sep 6 2014 /var/cpanel/ssl/cpanel/cpanel.pem
-rw-rw----. 1 cpanel cpanel 5624 Sep 6 2014 /var/cpanel/ssl/cpanel/mycpanel.cabundle
-rw-rw----. 1 cpanel cpanel 5624 Jun 22 2014 /var/cpanel/ssl/cpanel/mycpanel.cabundle.disable.1409975303
-rw-rw----. 1 cpanel cpanel 9218 Sep 6 2014 /var/cpanel/ssl/cpanel/mycpanel.pem
-rw-rw----. 1 cpanel cpanel 9214 Jun 22 2014 /var/cpanel/ssl/cpanel/mycpanel.pem.disable.1409975303

Thank you,

No, it's not restricted in WHM

The file, it generates one line for each domain, like this:

# Definition block for domain(s): ***.com  #
server {
    listen 443 ssl http2;
    #listen [::]:443 ssl http2; # Uncomment if your server supports IPv6
    server_name ***.com;
    # deny all; # DO NOT REMOVE OR CHANGE THIS LINE - Used when Engintron is disabled to block Nginx from becoming an open proxy
    ssl_certificate ;
    ssl_certificate_key ;
    ssl_trusted_certificate ;
    include common_https.conf;

When i disable engintron, all disapear.

Thank you,

Login as root and execute the following, each line at a time:

rm -f /etc/nginx/conf.d/default_https.conf
/etc/nginx/utilities/https_vhosts.php
cat /etc/nginx/conf.d/default_https.conf

The last line will print out the generated HTTPS definitions for Nginx. Copy it to a txt file and cleanup all the definitions except the VERY first one and the VERY last one. You'll have 2 definitions only in the end. Ommit the domain names ONLY and paste it back here.

root@ns1 [~]# cat /etc/nginx/conf.d/default_https.conf
# Default definition block for HTTPS (Generated on 2017.02.20 12:42:42) #
server {
    listen 443 ssl http2 default_server;
    #listen [::]:443 ssl http2 default_server; # Uncomment if your server supports IPv6
    server_name localhost;
    deny all; # DO NOT REMOVE OR CHANGE THIS LINE - Used when Engintron is disabled to block Nginx from becoming an open proxy
    ssl_certificate /var/cpanel/ssl/cpanel/mycpanel.pem;
    ssl_certificate_key /var/cpanel/ssl/cpanel/mycpanel.pem;
    ssl_trusted_certificate /var/cpanel/ssl/cpanel/mycpanel.pem;
    include common_https.conf;
    location = /nginx_status {
        stub_status;
        access_log off;
        log_not_found off;
        # Uncomment the following 2 lines to make the Nginx status page private.
        # If you do this and you have Munin installed, graphs for Nginx will stop working.
        #allow 127.0.0.1;
        #deny all;
    location = /whm-server-status {
        proxy_pass http://127.0.0.1:8080;
        # Comment the following 2 lines to make the Apache status page public
        allow 127.0.0.1;
        deny all;
          

OK. First let me know which cPanel version you're using and on which CentOS or CloudLinux release.

Secondly, if you do either:
cat /usr/local/apache/conf/httpd.conf
cat /etc/httpd/conf/httpd.conf
...is any output returned?

It's WHM 60 with CloudLinux 6.8 and CentOS 6.8.

And yes, return all domains with vHost, ssl files, root directory, and so on.

Thank you,

Same issue here (on all steps mentioned), WHM 60.0 (build 36) EasyApache 3, Apache 2.2 PHP5.5, centos 6.8 openvz (no cloudlinux).

The output of tail -n 10 /etc/nginx/utilities/error_log

[20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87 [20-Feb-2017 11:07:41 America/New_York] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 87

The vps time zone is Europe/Athens and the timezone conversion from America/New_York matches the correspoding log entries.

PS sorry for interrupting.

I have the same problem like other people.
Here is the output of: #tail /etc/nginx/utilities/error_log
[20-Feb-2017 22:16:32 UTC] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_get_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89 [20-Feb-2017 22:16:32 UTC] PHP Warning: file_put_contents(): Filename cannot be empty in /etc/nginx/utilities/https_vhosts.php on line 89

I have also sent you an email with my httpd.conf file.