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

Attempting to set up SSL site...

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
KeiroD
Posts: 61
Joined: Fri Oct 11, 2013 8:35 pm

Attempting to set up SSL site...
  • Quote

Post by KeiroD » Tue Dec 17, 2013 2:52 pm

So, I have SSL all set up nicely and the like.

Then I visit the website, first via domain.com and not https://domain.com

All looks good... right up until I visit https://domain.com

The https://domain.com has the default Vesta Coming Soon site... at least up until I removed the default index.html.

Now... it didn't take me long to realize that VestaCP for whatever reason has chosen to explicitly set public_html as non-SSL and public_shtml as SSL and serve contents separately.

This is not how I'd prefer it to be, as in cPanel, you didn't have to worry about whether or not the domain would duplicate content due to it being served separately.

Now, I moved the non-SSL site over to the SSL area and all works well... but there is one issue. I tried to throw in a .htaccess rewrite rule which forces anyone visiting the site in question over to the SSL version as a way of working around the issue... no go.

So I thought about symbolically linking public_shtml to public_html. Any specific suggestions for that?

Edit: I would prefer to not have to worry about whether one area is more updated than the other and whatnot. I'd just prefer to have both non-SSL and SSL to be served from the exact same place: public_html
Top

KeiroD
Posts: 61
Joined: Fri Oct 11, 2013 8:35 pm

Re: Attempting to set up SSL site...
  • Quote

Post by KeiroD » Tue Dec 17, 2013 7:42 pm

I actually managed to get SSL working properly for a very brief time... however, now I'm getting 403 forbiddens... and I'm struggling in figuring out the issue.

2013/12/17 11:41:02 [error] 19359#0: *3 openat() "/home/user/web/domain.com/document_errors/50x.html" failed (13: Permission denied), client: ip, server: domain.com, request: "GET /wp-admin HTTP/1.1", upstream: "http://ip:8080/wp-admin", host: "domain.com"

Unfortunately, Google's not exactly being helpful here in helping me trace down the exact issue... I mean, it's obviously a permissions issue... but as far as I can tell, it looks like everything's A-OK.
Top

nunim
Posts: 2
Joined: Wed Dec 18, 2013 7:46 am

Re: Attempting to set up SSL site...
  • Quote

Post by nunim » Wed Dec 18, 2013 7:51 am

You do not need to duplicate your content, simply set the SSL home to public_html as shown below:

Image

As far as permission errors, what's the chmod/owner of the document_errors folder and the files inside?
Top

KeiroD
Posts: 61
Joined: Fri Oct 11, 2013 8:35 pm

Re: Attempting to set up SSL site...
  • Quote

Post by KeiroD » Wed Dec 18, 2013 9:03 am

nunim wrote:You do not need to duplicate your content, simply set the SSL home to public_html as shown below:

Image

As far as permission errors, what's the chmod/owner of the document_errors folder and the files inside?
I tried setting it to public_html before you suggested it. Instead of working like I expected it to... it resulted in... if I remember correctly, a 403 Forbidden instead.

It turned out that I needed to set username:x:1002:nginx in order for it to work in /etc/groups so now the site's working... but I'm still encountering a 502 Bad Gateway on a subdirectory and... for some reason PHPMyAdmin is inaccessible.

If you'd like to see the website for yourself, http://charmedtouches.com/ (and the SSL version) works fine now... however, if you check out http://charmedtouches.com/store it results in a 502 bad gateway... and I need to get back into the server to see why. But again, for now... my head's toof uzzy for me to want to risk looking at the server and potentially making the issue worse.

I'll get to fixing it later... for now my head's too fuzzy for me to be able to see what's wrong... unless you'd like a look?

Also, by the way, the nginx configs have been more or less redone and properly commented out. I was able to replace your instance of php-fpm with Ubuntu's php-fpm instance from Ubuntu's repository. All works A-OK.
Top

skid
VestaCP Team
Posts: 1476
Joined: Wed Apr 06, 2011 11:12 pm

Re: Attempting to set up SSL site...
  • Quote

Post by skid » Wed Dec 18, 2013 9:17 pm

Try to set default nginx template. If you are using hosting template it might be to restrictive and cause problems.
What do you in the domain error log?
Top

KeiroD
Posts: 61
Joined: Fri Oct 11, 2013 8:35 pm

Re: Attempting to set up SSL site...
  • Quote

Post by KeiroD » Thu Dec 19, 2013 12:02 am

skid wrote:Try to set default nginx template. If you are using hosting template it might be to restrictive and cause problems.
What do you in the domain error log?
2013/12/17 15:34:27 [crit] 30869#0: *20 connect() to unix:/var/run/daniel-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 66.249.73.77, server: charmedtouches.com, request: "GET /index.php?id_product=17&controller=product HTTP/1.1", upstream: "fastcgi://unix:/var/run/daniel-fpm.sock:", host: "www.charmedtouches.com"

This happens when you visit charmedtouches.com/store

Edit: In fact, I'll just private message you so you can check it out... because I'm still learning my way around VestaCP and maybe you can see what's happening.

Also, feel free to use the changes for the php5-fpm that worked for Ubuntu for your own stuff.
Top

skid
VestaCP Team
Posts: 1476
Joined: Wed Apr 06, 2011 11:12 pm

Re: Attempting to set up SSL site...
  • Quote

Post by skid » Thu Dec 19, 2013 7:05 am

Answered
Top

KeiroD
Posts: 61
Joined: Fri Oct 11, 2013 8:35 pm

Re: Attempting to set up SSL site...
  • Quote

Post by KeiroD » Thu Dec 19, 2013 11:16 am

skid wrote:Answered
Indeed... now the store works... however, I have encountered another problem... a problem I did not expect, at all.

Apparently if you do a v-rebuild-web-domains... the user and their domains that were added via VestaCP are now gone.

However, the domains and stuff are still functioning, just... nothing visible in VestaCP.

Let me screenshot this.

Image

That's the admin panel. Normally, you should see the user has a domain and the like.

However, after running v-rebuild-web-domains... this does not appear to be the case.

Also, the DB screen where you add databases... they are like this, now for both Type and Host field, like so:

Image

Edit, I just tried to edit user daniel's details via the edit button as seen in the admin-panel screen. I press save, and get: Error code: 127

Edit2 @ 11:21AM CDT: Man, it took ages to trace down exactly where VestaCP is hiding its user data for users in the admin-panel.

By the way, that's in /usr/local/vesta/data for people who're wondering the same thing.

I notice that the data in web.conf and user.conf appears correct, but the admin panel is not showing this. How fix?
Top


Post Reply
  • Print view

8 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