Attempting to set up SSL site...
Attempting to set up SSL site...
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
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
Re: Attempting to set up SSL site...
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.
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.
Re: Attempting to set up SSL site...
You do not need to duplicate your content, simply set the SSL home to public_html as shown below:
As far as permission errors, what's the chmod/owner of the document_errors folder and the files inside?
As far as permission errors, what's the chmod/owner of the document_errors folder and the files inside?
Re: Attempting to set up SSL site...
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.nunim wrote:You do not need to duplicate your content, simply set the SSL home to public_html as shown below:
As far as permission errors, what's the chmod/owner of the document_errors folder and the files inside?
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.
Re: Attempting to set up SSL site...
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?
What do you in the domain error log?
Re: Attempting to set up SSL site...
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"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?
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.
Re: Attempting to set up SSL site...
Answered
Re: Attempting to set up SSL site...
Indeed... now the store works... however, I have encountered another problem... a problem I did not expect, at all.skid wrote:Answered
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.
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:
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?