Page 1 of 2

vestacp redirect to ssl

Posted: Tue Aug 13, 2013 2:33 pm
by puddled
Sorry if this has been covered before, but is there a way to automatically redirect request to the control panel from http to https so I dont see the nginx https error page if I forget.

I have tried adding rewrite rules to nginx.conf, adding htaccess files, but nothing seems to work.

Re: vestacp redirect to ssl

Posted: Fri Aug 16, 2013 9:15 am
by skid
Try this

Code: Select all

wget http://c.vestacp.com/0.9.8/rhel/vesta/nginx.conf -O /usr/local/vesta/nginx/conf/nginx.conf
service vesta restart

Re: vestacp redirect to ssl

Posted: Sat Sep 20, 2014 12:38 pm
by zanpo
I just tried this and now I can't access Vestacp at all, in Chrome I get this error: 'SSL connection error'

In nginx.conf I commented out the ssl lines, and still no changes:

Code: Select all

      #  ssl                  on;
      #  ssl_certificate      /usr/local/vesta/ssl/certificate.crt;
      #  ssl_certificate_key  /usr/local/vesta/ssl/certificate.key;
      #  ssl_session_cache    shared:SSL:10m;
      #  ssl_session_timeout  10m;
I tried accesing Vesta by http://myip:8083, it redirects me to https://myip:8083, and then the SSL error.

Any idea what should I do in this case? I'm a little worried about this.

Thanks

Re: vestacp redirect to ssl

Posted: Sun Sep 21, 2014 2:54 pm
by imperio
what do you want to do?

Re: vestacp redirect to ssl

Posted: Fri Mar 20, 2015 1:57 am
by guineapig
imperio wrote:what do you want to do?
He was very clear he wasn't his VestaCP control panel to be redirected from http:// to https://

Code: Select all

wget http://c.vestacp.com/0.9.8/rhel/vesta/nginx.conf -O /usr/local/vesta/nginx/conf/nginx.conf
service vesta restart
This gives me the same result as his..

Imperio did you even try that yourself before suggesting it to the community ?

Re: vestacp redirect to ssl

Posted: Fri Mar 20, 2015 8:02 am
by skurudo
guineapig wrote:Imperio did you even try that yourself before suggesting it to the community ?
When imperio suggesting this? It was skid. Try read posts too ;-)
guineapig wrote:He was very clear he wasn't his VestaCP control panel to be redirected from http:// to https://
Miss again - a way to automatically redirect request to the control panel from http to https , topic starter want perfect different, but after zanpo made his request.

Yeah, I don't find good solution yet, but there is no reason to be like a bad guy, guineapig.

Re: vestacp redirect to ssl

Posted: Fri Mar 20, 2015 8:14 am
by skurudo
zanpo wrote:I just tried this and now I can't access Vestacp at all, in Chrome I get this error: 'SSL connection error'
I tried accesing Vesta by http://myip:8083, it redirects me to https://myip:8083, and then the SSL error.
Any idea what should I do in this case? I'm a little worried about this.
/usr/local/vesta/nginx/conf/nginx.conf

Code: Select all

    server {
        listen          8083;
        server_name     _;
        root            /usr/local/vesta/web;
        charset         utf-8;
#        ssl                  on;
#        ssl_certificate      /usr/local/vesta/ssl/certificate.crt;
#        ssl_certificate_key  /usr/local/vesta/ssl/certificate.key;
#        ssl_session_cache    shared:SSL:10m;
#        ssl_session_timeout  10m;
and then - service vesta restart

It's work just fine without https.

Re: vestacp redirect to ssl

Posted: Fri Mar 20, 2015 8:19 am
by skurudo
For domain (cp.domain.com) user can make rewrite, but for IP only, I don't see a way to redirect from http to https.. I'm blind or something may be.

Re: vestacp redirect to ssl

Posted: Mon Apr 13, 2015 5:57 pm
by rednager
skurudo wrote:For domain (cp.domain.com) user can make rewrite, but for IP only, I don't see a way to redirect from http to https.. I'm blind or something may be.
Ну так что, получилось перенаправить трафик с http на https?

Re: vestacp redirect to ssl

Posted: Mon Apr 13, 2015 6:03 pm
by skurudo
rednager wrote:
skurudo wrote:For domain (cp.domain.com) user can make rewrite, but for IP only, I don't see a way to redirect from http to https.. I'm blind or something may be.
Ну так что, получилось перенаправить трафик с http на https?
Yep, but only for domain name not for IP address.

Конечно, как два пальца, но только для доменного имени, но не для IP-адреса.