Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Configure SSL to public_shtml or public_html

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
edica
Posts: 126
Joined: Tue May 26, 2015 7:31 pm

Configure SSL to public_shtml or public_html
  • Quote

Post by edica » Tue Feb 02, 2016 12:30 pm

Hello,

Install and configure SSL to public_shtml but still the site is going to public_html.
Image

Can I use public_html, has some difference?

Thanks.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Configure SSL to public_shtml or public_html
  • Quote

Post by skurudo » Tue Feb 02, 2016 2:25 pm

Seems like bug to me...

Yes, you can use separetely public_shtml and public_html. I don't know, when this thing broken - we try to check this, but you can make a little changes in /home/user/conf/web/sapache2.conf

DocumentRoot
Directory

public_html -> public_shtml
Top

edica
Posts: 126
Joined: Tue May 26, 2015 7:31 pm

Re: Configure SSL to public_shtml or public_html
  • Quote

Post by edica » Tue Feb 02, 2016 4:33 pm

Strange, was public_html. All fixed. Sorry.

Taking advantage, I can do so:
To go straight to the snginx.conf

/home/user/conf/web/nginx.conf:

server {
listen 000.000.000.000:80;
server_name mydomain.com www.mydomain.com;
#force https and www
return 301 https://www.mydomain.com$request_uri;
...
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Configure SSL to public_shtml or public_html
  • Quote

Post by skurudo » Tue Feb 02, 2016 8:43 pm

https://vestacp.com/docs/#how-to-force-https
Use this template to redirect, it's simple and no manually jobs with template.
Better use templates, if sometime somebody make rebuild no config changes will lost.
Top

edica
Posts: 126
Joined: Tue May 26, 2015 7:31 pm

Re: Configure SSL to public_shtml or public_html
  • Quote

Post by edica » Wed Feb 03, 2016 12:59 pm

Beautiful very good.

To force www can put in nginx.conf?
rewrite ^(.*) https://www.mydomain.com.br$1 permanent;

Thank you so much.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Configure SSL to public_shtml or public_html
  • Quote

Post by skurudo » Wed Feb 03, 2016 1:27 pm

edica wrote: To force www can put in nginx.conf?
rewrite ^(.*) https://www.mydomain.com.br$1 permanent;
Yeah, but a much better place - template.
If you'll make Rebuild Web in future, you don't lose this addition.
Top

edica
Posts: 126
Joined: Tue May 26, 2015 7:31 pm

Re: Configure SSL to public_shtml or public_html
  • Quote

Post by edica » Wed Feb 03, 2016 4:20 pm

Yes I installed template for nginx force-https. Very good.

But in force-https.tpl:

server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
location / {
rewrite ^(.*) https://www.%domain_idn%$1 permanent;
}
}

And if I put “www.”. The problem?

Thanks.
Top


Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password