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

NGINX not working with SSL

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
15 posts
  • 1
  • 2
  • Next
zebrahosting
Posts: 7
Joined: Sun Nov 15, 2015 7:21 am

NGINX not working with SSL
  • Quote

Post by zebrahosting » Sun Nov 15, 2015 7:26 am

Just setup a clean VestaCP on Ubu15. Version with only NGINX and FPM.
Created a Joomla site there and used the Joomla template. All worked fine and fast.
Then I tried to add a cert and switched on SSL. Then NGINX refuses to start.
Tried it with the 'home made' cert and with a RapidSSL but it is clearly not the Cert but the SSL function.
I have set the template from Joomla to default and back but nothing seems to bring NGINX back to live.
Switching off SSL and it runs fine. Firewall on of makes no difference either.

Any suggestions how to find the issue?

-- The result is failed.
Nov 15 12:56:24 xxxxx.hosting systemd[1]: nginx.service: Unit entered failed state.
Nov 15 12:56:24 xxxxx.hosting systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 15 12:56:24 xxxxx.hosting polkitd(authority=local)[632]: Unregistered Authentication Agent for unix-process:12391:39767588 (system bus name :1.106,
Nov 15 12:56:24 s01.zebra.hosting sudo[12390]: pam_unix(sudo:session): session closed for user root

Seems Ubuntu 15.10 uses systemd and VestCP is not handling that properly?
I also see that the STPL info is not copied into the nginx.conf properly
Top

iraton
Posts: 8
Joined: Thu May 22, 2014 7:51 pm

Re: NGINX not working with SSL
  • Quote

Post by iraton » Wed Nov 18, 2015 4:03 am

Hi

i've found the bug

Backup

/etc/nginx/conf.d/vesta.conf

Delete

Create a new vesta.conf with the following

include /home/admin/conf/web/*.conf;

Restart nginx
Top

zebrahosting
Posts: 7
Joined: Sun Nov 15, 2015 7:21 am

Re: NGINX not working with SSL
  • Quote

Post by zebrahosting » Fri Nov 27, 2015 9:20 pm

Thanks for the suggestion but it does not work for me. NGINX refused to start after I switch on SSL.

It creates the files alright but NGINX is not happy. CHecking logs after I get it back to running without SSL:
2015/11/15 10:56:14 [emerg] 60215#0: "ssl" directive is not allowed here in /home/admin/conf/web/nginx.conf:124

It seems when I switch off SSL it leaves some code in the .conf file too. Need to remove manual before I can restart.
Top

Elizine
Posts: 50
Joined: Wed Aug 12, 2015 12:11 pm
Contact:
Contact Elizine
Website

Re: NGINX not working with SSL
  • Quote

Post by Elizine » Sat Nov 28, 2015 9:38 am

Open port 443 in your web server's firewall.
Top

zebrahosting
Posts: 7
Joined: Sun Nov 15, 2015 7:21 am

Re: NGINX not working with SSL
  • Quote

Post by zebrahosting » Sat Nov 28, 2015 11:07 am

LOL no that is not the issue.

Iraton's finding is more close. Indeed I see that the SSL .conf is not picked up correctly but I also have the NGINX server not restarting properly after setting it.

Seems not many people are running the single NGINX + PHP-FPM combination.
Top

gogoi
Posts: 10
Joined: Tue Dec 01, 2015 3:20 am

Re: NGINX not working with SSL
  • Quote

Post by gogoi » Tue Dec 01, 2015 3:49 am

I tried ssl with nginx as cache .. but it didn't work... I think similar issue like yours.

Pls update when you get thru :)

Thanks a lot
Top

mephivio
Posts: 198
Joined: Thu Mar 27, 2014 7:35 am

Os: Debian 8x
Web: nginx + php-fpm
Re: NGINX not working with SSL
  • Quote

Post by mephivio » Tue Dec 01, 2015 11:53 am

hi vesta team,
have you test it ?
i have the same problem any fix ?
thx
Top

zebrahosting
Posts: 7
Joined: Sun Nov 15, 2015 7:21 am

Re: NGINX not working with SSL
  • Quote

Post by zebrahosting » Sat Dec 05, 2015 7:56 am

OK seems Vesta is only reacting when paid. Fair enough but is there a proper place to report bugs?

On a side note I should say I was using the Joomla template / config. Curious if the others with issues used the same or different settings.

Last night we had a site on TV and got huge amounts of visitors. The site was running Apache2 with NGINX proxy and Apache almost killed the server, switching to only NGINX dropped the load back to 50% and we had no further issues. Real reason to make this setup shine and fix the SSL bug.
Top

danimalweb
Posts: 8
Joined: Mon Nov 09, 2015 2:09 am

Re: NGINX not working with SSL
  • Quote

Post by danimalweb » Fri Dec 11, 2015 5:30 pm

I'm having similar issues with nginx.

After enabling SSL nginx fails to restart.

Code: Select all

● nginx.service - LSB: Stop/start nginx
   Loaded: loaded (/etc/init.d/nginx)
   Active: failed (Result: exit-code) since Fri 2015-12-11 12:23:38 EST; 23s ago
  Process: 6972 ExecStop=/etc/init.d/nginx stop (code=exited, status=0/SUCCESS)
  Process: 6553 ExecReload=/etc/init.d/nginx reload (code=exited, status=0/SUCCESS)
  Process: 8808 ExecStart=/etc/init.d/nginx start (code=exited, status=1/FAILURE)

Dec 11 12:23:38 ***************.com nginx[8808]: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/conf.d/vesta.conf:5
Dec 11 12:23:38 ***************.com systemd[1]: nginx.service: control process exited, code=exited status=1
Dec 11 12:23:38 ***************.com systemd[1]: Failed to start LSB: Stop/start nginx.
Dec 11 12:23:38 ***************.com systemd[1]: Unit nginx.service entered failed state.
Top

aar6on67
Posts: 2
Joined: Sun Dec 13, 2015 2:26 am

Re: NGINX not working with SSL
  • Quote

Post by aar6on67 » Sun Dec 13, 2015 2:32 am

I have the same problem with Centos 7 and nginx + php-fpm. SSL seems to turn on but once you reboot the server or try to restart nginx it fails to start. Turning off SSL solves any issues

This is my result

Code: Select all

# service nginx start
Redirecting to /bin/systemctl start  nginx.service
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
Top


Post Reply
  • Print view

15 posts
  • 1
  • 2
  • Next

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