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 + php-fpm + magento

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
12 posts
  • Previous
  • 1
  • 2
kaines
Posts: 10
Joined: Tue Dec 01, 2015 9:37 pm

Re: nginx + php-fpm + magento
  • Quote

Post by kaines » Tue Aug 09, 2016 7:56 am

all i did is this http://i64.tinypic.com/2crnlme.png - choose wrodpress template in this section, i didnt edit nothing the config.

if i choose DEFAULT i get:
server {
listen IP:8082;
server_name user.mydomain.com www.user.mydomain.com;
root /home/myusername/web/user.mydomain.com/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/user.mydomain.com.log combined;
access_log /var/log/nginx/domains/user.mydomain.com.bytes bytes;
error_log /var/log/nginx/domains/user.mydomain.com.error.log error;

location / {

location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}

location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}

fastcgi_pass 127.0.0.1:9004;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}

error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;

location /error/ {
alias /home/myusername/web/user.mydomain.com/document_errors/;
}

location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}

include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;

include /home/myuserna/conf/web/nginx.user.mydomain.com.conf*;
Top

SS88
Posts: 336
Joined: Thu Nov 19, 2015 12:40 pm

Re: nginx + php-fpm + magento
  • Quote

Post by SS88 » Tue Aug 09, 2016 8:09 am

This is a default wordpress2 Web Template (before it's written with user's config):

Code: Select all

server {
    listen      %ip%:%web_port%;
    server_name %domain_idn% %alias_idn%;
    root        %docroot%;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/%domain%.log combined;
    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
    error_log   /var/log/nginx/domains/%domain%.error.log error;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location / {
        try_files $uri $uri/ /index.php?$args;

        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
            expires     max;
        }

        location ~ [^/]\.php(/|$) {
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            if (!-f $document_root$fastcgi_script_name) {
                return  404;
            }

            fastcgi_pass    %backend_lsnr%;
            fastcgi_index   index.php;
            include         /etc/nginx/fastcgi_params;
        }
    }

    error_page  403 /error/404.html;
    error_page  404 /error/404.html;
    error_page  500 502 503 504 /error/50x.html;

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location ~* "/\.(htaccess|htpasswd)$" {
        deny    all;
        return  404;
    }

    include     /etc/nginx/conf.d/phpmyadmin.inc*;
    include     /etc/nginx/conf.d/phppgadmin.inc*;
    include     /etc/nginx/conf.d/webmail.inc*;

    include     %home%/%user%/conf/web/nginx.%domain%.conf*;
}
That code should work for Magento.

What's in the file: /usr/local/vesta/data/templates/web/nginx/php-fpm/wordpres2.tpl
Top


Post Reply
  • Print view

12 posts
  • Previous
  • 1
  • 2

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