Skip to content
This repository has been archived by the owner on Jan 16, 2020. It is now read-only.

Reinstall Error #31

Open
bekircem opened this issue Feb 15, 2017 · 17 comments
Open

Reinstall Error #31

bekircem opened this issue Feb 15, 2017 · 17 comments

Comments

@bekircem
Copy link

I follow the instructions and installed letsencrypt. Installation successfully completed. But i can't see "secure" on the Google Chrome. So i delete .ssl.conf and reinstall. When i do that site is down. There is a error output on the terminal when i use "sudo service nginx-sp restart" command.

root@******:/usr/local/bin# sudo service nginx-sp restart
Restarting nginx-sp: nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/******.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/*****.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx-sp.
@bekircem bekircem changed the title Error Reinstall Error Feb 15, 2017
@sinand
Copy link

sinand commented Feb 15, 2017

you should disable firewall from serverpilot, you can install another one from console later.

@bekircem
Copy link
Author

@sinand It works, reinstall is successfull. But, on the Google Chrome "secure" is not shown yet when i go https url.

@lesaff
Copy link
Owner

lesaff commented Feb 15, 2017

@bekircem, Google Chrome is notorious for caching SSL. You might want to test your site on different browser (if available). If not, try clearing browser history on your Chrome.

@bekircem
Copy link
Author

bekircem commented Feb 15, 2017

@lesaff not shown Opera Browser, IE and mobile.

Also i can not use force HTTPS. When i add codes to htaccess it gives me error. "ERR_TOO_MANY_REDIRECTS"
Could it be related to that?

This is the site I'm working on. You can check it.

@lesaff
Copy link
Owner

lesaff commented Feb 15, 2017

Looks like there's an htaccess rule that keeps redirecting the site to http://

@bekircem
Copy link
Author

@lesaff I'm still working on it so i delete codes on htaccess. But when i add it, it gives me "Too Many Redirects" error.

@lesaff
Copy link
Owner

lesaff commented Feb 15, 2017

Is there any other redirect rule somewhere in your htaccess that forces http?

@bekircem
Copy link
Author

@lesaff Only Wordpress defaults codes. Also i use Cloudflare but Cloudflare's SSL is not activated and there is no page rules.

`# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

END WordPress`

@lesaff
Copy link
Owner

lesaff commented Feb 15, 2017

I am not familiar with WP Supercache. Try turning it off or clearing the cache. Also, set your Cloudflare to dev mode for now. Here's your HTTP header info.

screen shot 2017-02-15 at 3 51 58 pm

@bekircem
Copy link
Author

Cloudflare dev mode for a long time, i clear cache. But nothing is change.

@oviliz
Copy link

oviliz commented Feb 15, 2017 via email

@bekircem
Copy link
Author

@oviliz I check it again,

Status: Development Mode

Caching for this website has been disabled.
Expires in 02:22:23

@lesaff
Copy link
Owner

lesaff commented Feb 15, 2017

@bekircem, as soon as you can find what's redirecting your site traffic to http:// you should be able to get your https running.

@bekircem
Copy link
Author

@lesaff I can't find because i have not change any settings on serverside and htaccess. It is default serverpilot server and serverpilot's force http settings but doesnt work. Pretty odd.

@oviliz
Copy link

oviliz commented Feb 19, 2017

@bekircem Would you cat your content of your Nginx website config file in /etc/nginx-sp/vhosts.d/yourwebsiteapp.conf?

@bekircem
Copy link
Author

@oviliz

server {
    listen       80;
    listen       [::]:80;
    server_name
        server-*****
        *****.com
        www.*****com
      ;

    root   /srv/users/serverpilot/apps/*****/public;

    access_log  /srv/users/serverpilot/log/*****/*****_nginx.access.log  main;
    error_log  /srv/users/serverpilot/log/*****/*****_nginx.error.log;

    proxy_set_header    Host              $host;
    proxy_set_header    X-Real-IP         $remote_addr;
    proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;

    include /etc/nginx-sp/vhosts.d/*****.d/*.nonssl_conf;
    include /etc/nginx-sp/vhosts.d/*****.d/*.conf;
}

@bekircem bekircem reopened this Feb 19, 2017
@oviliz
Copy link

oviliz commented Feb 19, 2017

Sorry, I'm not using this script and now I've seen that apparently generates an extra separated *.ssl.conf for your app.

If that's the case, just make sure that it writes something similar to this (not sure where the script stores the SSL files):

server {
    listen       443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name
        *****.com
        www.*****com
      ;

    ssl_certificate_key      ssl/*****.key;
    ssl_certificate          ssl/*****.combined_crt;

    root   /srv/users/serverpilot/apps/*****/public;

    access_log  /srv/users/serverpilot/log/*****/*****_nginx.access_ssl.log  main;
    error_log  /srv/users/serverpilot/log/*****/*****_nginx.error_ssl.log;

    proxy_set_header    Host              $host;
    proxy_set_header    X-Real-IP         $remote_addr;
    proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header    X-Forwarded-SSL   on;
    proxy_set_header    X-Forwarded-Proto $scheme;

    include /etc/nginx-sp/vhosts.d/*****.d/*.ssl_conf;
    include /etc/nginx-sp/vhosts.d/*****.d/*.conf;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants