My NGINX configuration is now throwing 404 Not Found nginx/1.10.0 (Ubuntu) EE. 1.14 The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Magento Admin Nginx 404Magento completely broken: Call to a member function getCode() on boolean & There was no 404 CMS page configured or foundMigrated from Apache to Nginx Except Homepage , Every Other Page shows 404?Magento 2 with nginx throwing 404 error on setup500 Internal Server Error nginx/1.12.0 on checkout page after Migration from Apache to NginxNew install on EC2 rewrite issuesMagento 2, 404 Not Found, nginx issueNginx Magento 2 403404 not found Nginx Magento 2
University's motivation for having tenure-track positions
First use of “packing” as in carrying a gun
Does the AirPods case need to be around while listening via an iOS Device?
Working through the single responsibility principle (SRP) in Python when calls are expensive
Are spiders unable to hurt humans, especially very small spiders?
Segmentation fault output is suppressed when piping stdin into a function. Why?
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Why is superheterodyning better than direct conversion?
A pet rabbit called Belle
How does this infinite series simplify to an integral?
What can I do if neighbor is blocking my solar panels intentionally?
Is a pteranodon too powerful as a beast companion for a beast master?
Difference between "generating set" and free product?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
How to test the equality of two Pearson correlation coefficients computed from the same sample?
Do working physicists consider Newtonian mechanics to be "falsified"?
Is above average number of years spent on PhD considered a red flag in future academia or industry positions?
How did passengers keep warm on sail ships?
Single author papers against my advisor's will?
Does Parliament hold absolute power in the UK?
Windows 10: How to Lock (not sleep) laptop on lid close?
How do I add random spotting to the same face in cycles?
Why can't devices on different VLANs, but on the same subnet, communicate?
how can a perfect fourth interval be considered either consonant or dissonant?
My NGINX configuration is now throwing 404 Not Found nginx/1.10.0 (Ubuntu) EE. 1.14
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Magento Admin Nginx 404Magento completely broken: Call to a member function getCode() on boolean & There was no 404 CMS page configured or foundMigrated from Apache to Nginx Except Homepage , Every Other Page shows 404?Magento 2 with nginx throwing 404 error on setup500 Internal Server Error nginx/1.12.0 on checkout page after Migration from Apache to NginxNew install on EC2 rewrite issuesMagento 2, 404 Not Found, nginx issueNginx Magento 2 403404 not found Nginx Magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm going to try and make this as detailed as possible because I feel like I've tried everything and at this point just need another set of eyes on everything.
I'm running a cloud server and I've installed my LEMP stack via terminal. Additionally, this is a magento build. I've migrated all files to the proper folder. var/www/html and I've installed mysql and imported my DB.
I'm currently able to run mywebsite.com/info.php
tki@me:/$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
tki@me:/$ ls -al /etc/nginx/sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 Feb 6 18:44 .
drwxr-xr-x 6 root root 4096 Feb 6 18:03 ..
lrwxrwxrwx 1 root root 34 Feb 4 15:48 default -> /etc/nginx/sites-available/default
tki@me:/$ sudo lsof -i -P | grep -i "listen"
sendmail- 1084 root 3u IPv4 14208 0t0 TCP localhost:25 (LISTEN)
sendmail- 1084 root 5u IPv4 14209 0t0 TCP localhost:587 (LISTEN)
sshd 1122 root 3u IPv4 14322 0t0 TCP *:22 (LISTEN)
sshd 1122 root 4u IPv6 14331 0t0 TCP *:22 (LISTEN)
mysqld 14732 mysql 19u IPv4 76527 0t0 TCP localhost:3306 (LISTEN)
Here is my sites-available/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my sites-enabled/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my nginx.conf file:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events
worker_connections 768;
# multi_accept on;
http
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# fastcgi_param MAGE_RUN_CODE default;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Is there anything blatantly obvious that's wrong with my configurations?
magento-enterprise nginx php-7 enterprise-1.14
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm going to try and make this as detailed as possible because I feel like I've tried everything and at this point just need another set of eyes on everything.
I'm running a cloud server and I've installed my LEMP stack via terminal. Additionally, this is a magento build. I've migrated all files to the proper folder. var/www/html and I've installed mysql and imported my DB.
I'm currently able to run mywebsite.com/info.php
tki@me:/$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
tki@me:/$ ls -al /etc/nginx/sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 Feb 6 18:44 .
drwxr-xr-x 6 root root 4096 Feb 6 18:03 ..
lrwxrwxrwx 1 root root 34 Feb 4 15:48 default -> /etc/nginx/sites-available/default
tki@me:/$ sudo lsof -i -P | grep -i "listen"
sendmail- 1084 root 3u IPv4 14208 0t0 TCP localhost:25 (LISTEN)
sendmail- 1084 root 5u IPv4 14209 0t0 TCP localhost:587 (LISTEN)
sshd 1122 root 3u IPv4 14322 0t0 TCP *:22 (LISTEN)
sshd 1122 root 4u IPv6 14331 0t0 TCP *:22 (LISTEN)
mysqld 14732 mysql 19u IPv4 76527 0t0 TCP localhost:3306 (LISTEN)
Here is my sites-available/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my sites-enabled/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my nginx.conf file:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events
worker_connections 768;
# multi_accept on;
http
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# fastcgi_param MAGE_RUN_CODE default;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Is there anything blatantly obvious that's wrong with my configurations?
magento-enterprise nginx php-7 enterprise-1.14
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm going to try and make this as detailed as possible because I feel like I've tried everything and at this point just need another set of eyes on everything.
I'm running a cloud server and I've installed my LEMP stack via terminal. Additionally, this is a magento build. I've migrated all files to the proper folder. var/www/html and I've installed mysql and imported my DB.
I'm currently able to run mywebsite.com/info.php
tki@me:/$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
tki@me:/$ ls -al /etc/nginx/sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 Feb 6 18:44 .
drwxr-xr-x 6 root root 4096 Feb 6 18:03 ..
lrwxrwxrwx 1 root root 34 Feb 4 15:48 default -> /etc/nginx/sites-available/default
tki@me:/$ sudo lsof -i -P | grep -i "listen"
sendmail- 1084 root 3u IPv4 14208 0t0 TCP localhost:25 (LISTEN)
sendmail- 1084 root 5u IPv4 14209 0t0 TCP localhost:587 (LISTEN)
sshd 1122 root 3u IPv4 14322 0t0 TCP *:22 (LISTEN)
sshd 1122 root 4u IPv6 14331 0t0 TCP *:22 (LISTEN)
mysqld 14732 mysql 19u IPv4 76527 0t0 TCP localhost:3306 (LISTEN)
Here is my sites-available/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my sites-enabled/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my nginx.conf file:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events
worker_connections 768;
# multi_accept on;
http
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# fastcgi_param MAGE_RUN_CODE default;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Is there anything blatantly obvious that's wrong with my configurations?
magento-enterprise nginx php-7 enterprise-1.14
I'm going to try and make this as detailed as possible because I feel like I've tried everything and at this point just need another set of eyes on everything.
I'm running a cloud server and I've installed my LEMP stack via terminal. Additionally, this is a magento build. I've migrated all files to the proper folder. var/www/html and I've installed mysql and imported my DB.
I'm currently able to run mywebsite.com/info.php
tki@me:/$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
tki@me:/$ ls -al /etc/nginx/sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 Feb 6 18:44 .
drwxr-xr-x 6 root root 4096 Feb 6 18:03 ..
lrwxrwxrwx 1 root root 34 Feb 4 15:48 default -> /etc/nginx/sites-available/default
tki@me:/$ sudo lsof -i -P | grep -i "listen"
sendmail- 1084 root 3u IPv4 14208 0t0 TCP localhost:25 (LISTEN)
sendmail- 1084 root 5u IPv4 14209 0t0 TCP localhost:587 (LISTEN)
sshd 1122 root 3u IPv4 14322 0t0 TCP *:22 (LISTEN)
sshd 1122 root 4u IPv6 14331 0t0 TCP *:22 (LISTEN)
mysqld 14732 mysql 19u IPv4 76527 0t0 TCP localhost:3306 (LISTEN)
Here is my sites-available/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my sites-enabled/default
server
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
#index index.html index.htm index.nginx-debian.html;
#server_name server_domain_or_IP;
server_name mysite.com;
location /
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
location ~ .php$
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
location ~ /.ht
deny all;
Here is my nginx.conf file:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events
worker_connections 768;
# multi_accept on;
http
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# fastcgi_param MAGE_RUN_CODE default;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
Is there anything blatantly obvious that's wrong with my configurations?
magento-enterprise nginx php-7 enterprise-1.14
magento-enterprise nginx php-7 enterprise-1.14
edited Oct 27 '17 at 5:13
Nits
1,277416
1,277416
asked Feb 7 '17 at 19:56
Head WayHead Way
125
125
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If that Nginx configuration is for Magento 2 (you didn't specify which version of Magento is) then you should include into your:
sites-enabled/default.conf
this configuration:
nginx config for magento2
the best approach is to create an additional file and include it into your server defaul.
Update Answer
Crossed myself this problem couple days ago.
It was happening because these variables were receiving the following values from Nginx:
/* Store or website code */
$mageRunCode = 'default';
/* Run store or run website */
$mageRunType = 'store';
while my default customer store was english.
After carefully checking the configuration and passing the right values from Nginx:
set $MAGE_RUN_CODE english;
set $MAGE_RUN_TYPE store;
I went into the PHP-FPM configuration file, the one where the fastcgi params are passed further and had the surprise to find the values
wrong hardcoded:
fastcgi_param MAGE_RUN_CODE 'defaul'
fastcgi_param MAGE_RUN_TYPE 'store';
In fact it should have been these:
fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;
fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE;
Which allows you to pass the upper defined value from Nginx to Magento.
So in your case I would have a look in this file:
include snippets/fastcgi-php.conf;
you have it in your nginx conf.
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f158625%2fmy-nginx-configuration-is-now-throwing-404-not-found-nginx-1-10-0-ubuntu-ee-1%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If that Nginx configuration is for Magento 2 (you didn't specify which version of Magento is) then you should include into your:
sites-enabled/default.conf
this configuration:
nginx config for magento2
the best approach is to create an additional file and include it into your server defaul.
Update Answer
Crossed myself this problem couple days ago.
It was happening because these variables were receiving the following values from Nginx:
/* Store or website code */
$mageRunCode = 'default';
/* Run store or run website */
$mageRunType = 'store';
while my default customer store was english.
After carefully checking the configuration and passing the right values from Nginx:
set $MAGE_RUN_CODE english;
set $MAGE_RUN_TYPE store;
I went into the PHP-FPM configuration file, the one where the fastcgi params are passed further and had the surprise to find the values
wrong hardcoded:
fastcgi_param MAGE_RUN_CODE 'defaul'
fastcgi_param MAGE_RUN_TYPE 'store';
In fact it should have been these:
fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;
fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE;
Which allows you to pass the upper defined value from Nginx to Magento.
So in your case I would have a look in this file:
include snippets/fastcgi-php.conf;
you have it in your nginx conf.
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
add a comment |
If that Nginx configuration is for Magento 2 (you didn't specify which version of Magento is) then you should include into your:
sites-enabled/default.conf
this configuration:
nginx config for magento2
the best approach is to create an additional file and include it into your server defaul.
Update Answer
Crossed myself this problem couple days ago.
It was happening because these variables were receiving the following values from Nginx:
/* Store or website code */
$mageRunCode = 'default';
/* Run store or run website */
$mageRunType = 'store';
while my default customer store was english.
After carefully checking the configuration and passing the right values from Nginx:
set $MAGE_RUN_CODE english;
set $MAGE_RUN_TYPE store;
I went into the PHP-FPM configuration file, the one where the fastcgi params are passed further and had the surprise to find the values
wrong hardcoded:
fastcgi_param MAGE_RUN_CODE 'defaul'
fastcgi_param MAGE_RUN_TYPE 'store';
In fact it should have been these:
fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;
fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE;
Which allows you to pass the upper defined value from Nginx to Magento.
So in your case I would have a look in this file:
include snippets/fastcgi-php.conf;
you have it in your nginx conf.
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
add a comment |
If that Nginx configuration is for Magento 2 (you didn't specify which version of Magento is) then you should include into your:
sites-enabled/default.conf
this configuration:
nginx config for magento2
the best approach is to create an additional file and include it into your server defaul.
Update Answer
Crossed myself this problem couple days ago.
It was happening because these variables were receiving the following values from Nginx:
/* Store or website code */
$mageRunCode = 'default';
/* Run store or run website */
$mageRunType = 'store';
while my default customer store was english.
After carefully checking the configuration and passing the right values from Nginx:
set $MAGE_RUN_CODE english;
set $MAGE_RUN_TYPE store;
I went into the PHP-FPM configuration file, the one where the fastcgi params are passed further and had the surprise to find the values
wrong hardcoded:
fastcgi_param MAGE_RUN_CODE 'defaul'
fastcgi_param MAGE_RUN_TYPE 'store';
In fact it should have been these:
fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;
fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE;
Which allows you to pass the upper defined value from Nginx to Magento.
So in your case I would have a look in this file:
include snippets/fastcgi-php.conf;
you have it in your nginx conf.
If that Nginx configuration is for Magento 2 (you didn't specify which version of Magento is) then you should include into your:
sites-enabled/default.conf
this configuration:
nginx config for magento2
the best approach is to create an additional file and include it into your server defaul.
Update Answer
Crossed myself this problem couple days ago.
It was happening because these variables were receiving the following values from Nginx:
/* Store or website code */
$mageRunCode = 'default';
/* Run store or run website */
$mageRunType = 'store';
while my default customer store was english.
After carefully checking the configuration and passing the right values from Nginx:
set $MAGE_RUN_CODE english;
set $MAGE_RUN_TYPE store;
I went into the PHP-FPM configuration file, the one where the fastcgi params are passed further and had the surprise to find the values
wrong hardcoded:
fastcgi_param MAGE_RUN_CODE 'defaul'
fastcgi_param MAGE_RUN_TYPE 'store';
In fact it should have been these:
fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;
fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE;
Which allows you to pass the upper defined value from Nginx to Magento.
So in your case I would have a look in this file:
include snippets/fastcgi-php.conf;
you have it in your nginx conf.
edited Oct 27 '17 at 13:59
answered Feb 8 '17 at 15:43
obsergiuobsergiu
5710
5710
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
add a comment |
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
It's not for magento 2, sorry that i didn't specify. I'll add that now.
– Head Way
Feb 11 '17 at 18:56
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f158625%2fmy-nginx-configuration-is-now-throwing-404-not-found-nginx-1-10-0-ubuntu-ee-1%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown