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

Magento 1.9.2 NGINX Config with SSL Enabled

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
alikamran
Posts: 16
Joined: Tue May 03, 2016 10:54 am

Magento 1.9.2 NGINX Config with SSL Enabled
  • Quote

Post by alikamran » Fri Jul 27, 2018 10:32 am

Hi,
I have finally decided to enable SSL on my website. But I am not sure how to enable a third party SSL certificate on Vesta and configure the nginx for Magento 1.9.2 to work with it. Following are the details:

CentOS 7
nginx+php-fpm
VestaCP
Comodo InstantSSL

I need guidance on what block should I do to enable SSL and make it work properly with the website? Also what config should I add in snginx.domain.com? Thank you.

Current nginx config:

Code: Select all

server {
listen 80 default;
server_name hidden;
root hidden;

location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
}

location ^~ /app/                { deny all; }
location ^~ /includes/           { deny all; }
location ^~ /lib/                { deny all; }
location ^~ /media/downloadable/ { deny all; }
location ^~ /pkginfo/            { deny all; }
location ^~ /report/config.xml   { deny all; }
location ^~ /var/                { deny all; }

location /var/export/ {
auth_basic           "Restricted";
auth_basic_user_file htpasswd;
autoindex            on;
}

location  /. {
return 404;
}

location @handler {
rewrite / /index.php;
}

location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}

location ~ .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }

expires        off;
fastcgi_pass   127.0.0.1:9000;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
fastcgi_param  MAGE_RUN_CODE default;
fastcgi_param  MAGE_RUN_TYPE store;
include        fastcgi_params; ## See /etc/nginx/fastcgi_params
}
}
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Magento 1.9.2 NGINX Config with SSL Enabled
  • Quote

Post by mehargags » Sat Jul 28, 2018 6:53 am

You just put SSL thru the regular web user interface and then apply any custom config in the apache/nginx.ssl.conf, though you really should have a template defined for your site if you need to customize it.
Top

alikamran
Posts: 16
Joined: Tue May 03, 2016 10:54 am

Re: Magento 1.9.2 NGINX Config with SSL Enabled
  • Quote

Post by alikamran » Sat Jul 28, 2018 10:13 am

mehargags wrote: ↑
Sat Jul 28, 2018 6:53 am
You just put SSL thru the regular web user interface and then apply any custom config in the apache/nginx.ssl.conf, though you really should have a template defined for your site if you need to customize it.
Hi,
Thank you for the reply. If it is not too much trouble can you give me sample config to use for SSL or what should I add in the server block in the current config I am using?

Also what do you mean by a web template?
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Magento 1.9.2 NGINX Config with SSL Enabled
  • Quote

Post by mehargags » Wed Aug 01, 2018 8:43 pm

The template thing is much discussed in detail, you need to read a few old threads yourself.
Just use wordpress 2 template for Magento 1.9.x and add SSL from the WebUI. it is so simple.

If you still need help, PM me your VestaCP and Server's SSH, I'll fix this for you
Top

alikamran
Posts: 16
Joined: Tue May 03, 2016 10:54 am

Re: Magento 1.9.2 NGINX Config with SSL Enabled
  • Quote

Post by alikamran » Thu Aug 09, 2018 12:26 pm

mehargags wrote: ↑
Wed Aug 01, 2018 8:43 pm
The template thing is much discussed in detail, you need to read a few old threads yourself.
Just use wordpress 2 template for Magento 1.9.x and add SSL from the WebUI. it is so simple.

If you still need help, PM me your VestaCP and Server's SSH, I'll fix this for you
Thank you for the update. Ill try and let you know if I need any help. Thank you.
Top


Post Reply
  • Print view

5 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