map $http_host $MAGE_RUN_CODE {
in.phpcodez.com default;
}
map $http_host $MAGE_RUN_TYPE {
in.phpcodez.com store;
}
server {
listen 80;
server_name in.phpcodez.com;
set $MAGE_ROOT /usr/share/nginx/html/phpcodez;
set $MAGE_MODE developer;
include /usr/share/nginx/html/phpcodez/nginx.conf.sample;
}
Tag Archives: Default
Magento 2 Default Nginx Configuration
upstream fastcgi_backend {server unix:/var/run/php-fpm/php-fpm.sock;}server {listen 80;server_name www.phpcodez.com phpcodez.com;set $MAGE_ROOT /usr/share/nginx/html/phpcodez;include /usr/share/nginx/html/phpcodez/nginx.conf.sample;}
Default Nginx Configuration
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Default Nginx PHP-FPM Configuration
server {
listen 80;
server_name localhost;
# note that these lines are originally from the "location /" block
root /usr/share/nginx/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}