500 Internal Server Error nginx/1.12.0 on checkout page after Migration from Apache to NginxMagento wrongly redirects https!Magento Admin Nginx 404Web Server (Apache) Rewrites on NGINXMove store from Apache to Nginx serverMagento 2: “There has been an error processing your request”Migrated from Apache to Nginx Except Homepage , Every Other Page shows 404?Magento 2 nginx ssl problemsNew install on EC2 rewrite issuesError 500 after magento migrationNginx Magento 2 403
Red and White Squares
What happens if the limit of 4 billion files was exceeded in an ext4 partition?
The Purpose of "Natu"
Why did moving the mouse cursor cause Windows 95 to run more quickly?
Bypass with wrong cvv of debit card and getting OTP
Can a USB hub be used to access a drive from 2 devices?
Isn't "Dave's protocol" good if only the database, and not the code, is leaked?
Will Jimmy fall off his platform?
LTSpice: how to setup sinusoidal or exponential voltage source?
What is the highest level of accuracy in motion control a Victorian society could achieve?
What causes a fastener to lock?
Shipped package arrived - didn't order, possible scam?
Was the 45.9°C temperature in France in June 2019 the highest ever recorded in France?
Sleepy tired vs physically tired
Taking my Ph.D. advisor out for dinner after graduation
What is the shape of the upper boundary of water hitting a screen?
Why do we need a bootloader separate from our application program in microcontrollers?
Why do most airliners have underwing engines, while business jets have rear-mounted engines?
PhD: When to quit and move on?
Taking advantage when the HR forgets to communicate the rules
Can you take the Dodge action while prone?
How did the IEC decide to create kibibytes?
Has there ever been a cold war other than between the U.S. and the U.S.S.R.?
Should I increase my 401(k) contributions, or increase my mortgage payments
500 Internal Server Error nginx/1.12.0 on checkout page after Migration from Apache to Nginx
Magento wrongly redirects https!Magento Admin Nginx 404Web Server (Apache) Rewrites on NGINXMove store from Apache to Nginx serverMagento 2: “There has been an error processing your request”Migrated from Apache to Nginx Except Homepage , Every Other Page shows 404?Magento 2 nginx ssl problemsNew install on EC2 rewrite issuesError 500 after magento migrationNginx Magento 2 403
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
i'm facing a problem with nginx rewrites after i migrate my Magento website from Apache to Nginx!
When i add a product to the cart and i press the button Place the order is giving me 500 internal server error !
I opened my logs and i can see this error message :
2017/05/26 13:03:39 [error] 48314#48314: *4022 could not find named location "@handler", client: 81.149.36.86, server: abcsports.co.uk, request: "GET /index.php/checkout/onepage/ HTTP/1.1", host: "www.....", referrer: "http://www........"
My conf file is looking like that :
Redirect to www.
server
listen 80;
server_name abcsports.co.uk;
return 301 $scheme://www.$host$request_uri;Set FPM pool socket for Magento Dashboard, based on adminhtml cookie
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;server var)/ deny all;
location /. return 404;
location @handler rewrite / /index.php;
#location ~ .php/ rewrite ^(.*.php)/ last;location ~ .php$
#if (!-e $request_filename) rewrite / /index.php last;
expires off;
fastcgi_pass $phpfpm_socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_param HTTPS $httpss;
include fastcgi_params;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
server
listen 443 ssl;
server_name abcsports.co.uk www.abcsports.co.uk media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html/;
ssl on;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;location /
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
I looked everywhere on the internet and i read a lot of things but didn't find the solution ! I would appreciate any help !
Thank you !
magento-1.9 nginx apache
add a comment |
i'm facing a problem with nginx rewrites after i migrate my Magento website from Apache to Nginx!
When i add a product to the cart and i press the button Place the order is giving me 500 internal server error !
I opened my logs and i can see this error message :
2017/05/26 13:03:39 [error] 48314#48314: *4022 could not find named location "@handler", client: 81.149.36.86, server: abcsports.co.uk, request: "GET /index.php/checkout/onepage/ HTTP/1.1", host: "www.....", referrer: "http://www........"
My conf file is looking like that :
Redirect to www.
server
listen 80;
server_name abcsports.co.uk;
return 301 $scheme://www.$host$request_uri;Set FPM pool socket for Magento Dashboard, based on adminhtml cookie
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;server var)/ deny all;
location /. return 404;
location @handler rewrite / /index.php;
#location ~ .php/ rewrite ^(.*.php)/ last;location ~ .php$
#if (!-e $request_filename) rewrite / /index.php last;
expires off;
fastcgi_pass $phpfpm_socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_param HTTPS $httpss;
include fastcgi_params;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
server
listen 443 ssl;
server_name abcsports.co.uk www.abcsports.co.uk media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html/;
ssl on;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;location /
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
I looked everywhere on the internet and i read a lot of things but didn't find the solution ! I would appreciate any help !
Thank you !
magento-1.9 nginx apache
could not find named location "@handler"
– MagenX
May 31 '17 at 7:09
add a comment |
i'm facing a problem with nginx rewrites after i migrate my Magento website from Apache to Nginx!
When i add a product to the cart and i press the button Place the order is giving me 500 internal server error !
I opened my logs and i can see this error message :
2017/05/26 13:03:39 [error] 48314#48314: *4022 could not find named location "@handler", client: 81.149.36.86, server: abcsports.co.uk, request: "GET /index.php/checkout/onepage/ HTTP/1.1", host: "www.....", referrer: "http://www........"
My conf file is looking like that :
Redirect to www.
server
listen 80;
server_name abcsports.co.uk;
return 301 $scheme://www.$host$request_uri;Set FPM pool socket for Magento Dashboard, based on adminhtml cookie
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;server var)/ deny all;
location /. return 404;
location @handler rewrite / /index.php;
#location ~ .php/ rewrite ^(.*.php)/ last;location ~ .php$
#if (!-e $request_filename) rewrite / /index.php last;
expires off;
fastcgi_pass $phpfpm_socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_param HTTPS $httpss;
include fastcgi_params;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
server
listen 443 ssl;
server_name abcsports.co.uk www.abcsports.co.uk media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html/;
ssl on;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;location /
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
I looked everywhere on the internet and i read a lot of things but didn't find the solution ! I would appreciate any help !
Thank you !
magento-1.9 nginx apache
i'm facing a problem with nginx rewrites after i migrate my Magento website from Apache to Nginx!
When i add a product to the cart and i press the button Place the order is giving me 500 internal server error !
I opened my logs and i can see this error message :
2017/05/26 13:03:39 [error] 48314#48314: *4022 could not find named location "@handler", client: 81.149.36.86, server: abcsports.co.uk, request: "GET /index.php/checkout/onepage/ HTTP/1.1", host: "www.....", referrer: "http://www........"
My conf file is looking like that :
Redirect to www.
server
listen 80;
server_name abcsports.co.uk;
return 301 $scheme://www.$host$request_uri;Set FPM pool socket for Magento Dashboard, based on adminhtml cookie
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;server var)/ deny all;
location /. return 404;
location @handler rewrite / /index.php;
#location ~ .php/ rewrite ^(.*.php)/ last;location ~ .php$
#if (!-e $request_filename) rewrite / /index.php last;
expires off;
fastcgi_pass $phpfpm_socket;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_param HTTPS $httpss;
include fastcgi_params;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
server
listen 443 ssl;
server_name abcsports.co.uk www.abcsports.co.uk media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html/;
ssl on;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;location /
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
I looked everywhere on the internet and i read a lot of things but didn't find the solution ! I would appreciate any help !
Thank you !
magento-1.9 nginx apache
magento-1.9 nginx apache
edited May 26 '17 at 22:43
Cantemir Alex
asked May 26 '17 at 22:14
Cantemir AlexCantemir Alex
83 bronze badges
83 bronze badges
could not find named location "@handler"
– MagenX
May 31 '17 at 7:09
add a comment |
could not find named location "@handler"
– MagenX
May 31 '17 at 7:09
could not find named location "@handler"
– MagenX
May 31 '17 at 7:09
could not find named location "@handler"
– MagenX
May 31 '17 at 7:09
add a comment |
1 Answer
1
active
oldest
votes
(1) This configuration file is derived from your file and is created with the assumption that you want to force SSL on your primary domain, abcsports.co.uk. This is recommended.
(2) I moved the subdomains, "media.abcsports.co.uk, skin.abcsports.co.uk, and js.abcsports.co.uk" into separate server blocks. By default, SSL is not forced for these subdomains, but you could enable the redirections as instructed in the configuration file. Ensure that the SSL certificates for abcsports.co.uk is applicable to the subdomains before activating the SSL block for the subdomains.
(3) There could be errors. Use the error log to debug them.
(4) Backup the current vhost file because using this one. You can do this during a low traffic period.
server
listen 80;
server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# root /var/www/vhosts/abcsports.co.uk/httpdocs;
root /var/www/html/abcsports.co.uk/public_html;
location /
index index.php;
try_files $uri $uri/ /index.php?$args;
expires 30d;
access_log /var/log/nginx/abcsports.co.uk-access.log;
error_log /var/log/nginx/abcsports.co.uk-error.log;
# Enable this server block if you want to enable ssl redirection to the SSL block below. Ensure you disable the above HTTP block, you enable this block.
#server
# listen 80;
# server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# server_tokens off;
# return 301 https://$server_name$request_uri;
#
#server
#listen 443 ssl;
#server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
#root /var/www/html/abcsports.co.uk/public_html/;
#ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
#error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;
#location /
#index index.html index.php;
#try_files $uri $uri/ @handler;
expires 30d;
#
#
server
listen 80 default_server;
server_name abcsports.co.uk www.abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl;
#listen 443 http2 ssl; uncomment this line and comment line 9 if Nginx was compiled with http2
server_name abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl default_server;
#listen 443 http2 ssl default_server;
server_name www.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html;
index index.php;
access_log /var/log/nginx/abcsports.co.uk-ssl-access.log combined;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log error;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;
client_body_buffer_size 128K;
client_body_timeout 3m;
client_header_buffer_size 3m;
large_client_header_buffers 4 256k;
client_header_timeout 3m;
client_max_body_size 100M;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml
application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
#add_header Strict-Transport-Security "max-age=31536000"; #Enable this after you understand the implications of STS
location / jpg
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;
location ~ .php$
charset utf-8;
default_type text/html;
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass $phpfpm_socket;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
#fastcgi_param HTTPS $httpss; #No longer needed
fastcgi_read_timeout 300;
fastcgi_keep_conn on;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
fastcgi_index index.php;
#include /etc/nginx/fastcgi_params; #To include additional fastcgi_param
location @handler ## Magento uses a common front handler
rewrite / /index.php?$args;
# Enable to restrict access to your downloader folder
#location /downloader
#error_page 403 = @deny_downloader;
#allow xx.xx.xx.xx; #Change to your static or current dynamic IP. Restart Nginx after each modification. You can duplicate this line.
#deny all;
#index index.php;
#try_files $uri $uri/ /index.php?$args;
#
location @deny_downloader
return 303 https://www.abcsports.co.uk;
location ~ .php/
rewrite ^(.*.php)/ $1 last;
location ~ /.well-known
allow all;
## These locations would be hidden by .htaccess normally
location ^~ /app/ deny all;
location ^~ /includes/ deny all;
location ^~ /lib/ deny all;
location ^~ /var/ deny all;
location /var/export/ deny all;
location /media/customer/ deny all;
location /media/downloadable/ deny all;
location ~ cron.php deny all;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /.ht
deny all;
location /.
return 404;
# Enable for custom error files
#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/admin/web/abcsports.co.uk/document_errors/;
#
location ~* "/.(htaccess
Expecting your feedback. Cheers!
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%2f176297%2f500-internal-server-error-nginx-1-12-0-on-checkout-page-after-migration-from-apa%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
(1) This configuration file is derived from your file and is created with the assumption that you want to force SSL on your primary domain, abcsports.co.uk. This is recommended.
(2) I moved the subdomains, "media.abcsports.co.uk, skin.abcsports.co.uk, and js.abcsports.co.uk" into separate server blocks. By default, SSL is not forced for these subdomains, but you could enable the redirections as instructed in the configuration file. Ensure that the SSL certificates for abcsports.co.uk is applicable to the subdomains before activating the SSL block for the subdomains.
(3) There could be errors. Use the error log to debug them.
(4) Backup the current vhost file because using this one. You can do this during a low traffic period.
server
listen 80;
server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# root /var/www/vhosts/abcsports.co.uk/httpdocs;
root /var/www/html/abcsports.co.uk/public_html;
location /
index index.php;
try_files $uri $uri/ /index.php?$args;
expires 30d;
access_log /var/log/nginx/abcsports.co.uk-access.log;
error_log /var/log/nginx/abcsports.co.uk-error.log;
# Enable this server block if you want to enable ssl redirection to the SSL block below. Ensure you disable the above HTTP block, you enable this block.
#server
# listen 80;
# server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# server_tokens off;
# return 301 https://$server_name$request_uri;
#
#server
#listen 443 ssl;
#server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
#root /var/www/html/abcsports.co.uk/public_html/;
#ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
#error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;
#location /
#index index.html index.php;
#try_files $uri $uri/ @handler;
expires 30d;
#
#
server
listen 80 default_server;
server_name abcsports.co.uk www.abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl;
#listen 443 http2 ssl; uncomment this line and comment line 9 if Nginx was compiled with http2
server_name abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl default_server;
#listen 443 http2 ssl default_server;
server_name www.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html;
index index.php;
access_log /var/log/nginx/abcsports.co.uk-ssl-access.log combined;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log error;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;
client_body_buffer_size 128K;
client_body_timeout 3m;
client_header_buffer_size 3m;
large_client_header_buffers 4 256k;
client_header_timeout 3m;
client_max_body_size 100M;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml
application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
#add_header Strict-Transport-Security "max-age=31536000"; #Enable this after you understand the implications of STS
location / jpg
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;
location ~ .php$
charset utf-8;
default_type text/html;
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass $phpfpm_socket;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
#fastcgi_param HTTPS $httpss; #No longer needed
fastcgi_read_timeout 300;
fastcgi_keep_conn on;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
fastcgi_index index.php;
#include /etc/nginx/fastcgi_params; #To include additional fastcgi_param
location @handler ## Magento uses a common front handler
rewrite / /index.php?$args;
# Enable to restrict access to your downloader folder
#location /downloader
#error_page 403 = @deny_downloader;
#allow xx.xx.xx.xx; #Change to your static or current dynamic IP. Restart Nginx after each modification. You can duplicate this line.
#deny all;
#index index.php;
#try_files $uri $uri/ /index.php?$args;
#
location @deny_downloader
return 303 https://www.abcsports.co.uk;
location ~ .php/
rewrite ^(.*.php)/ $1 last;
location ~ /.well-known
allow all;
## These locations would be hidden by .htaccess normally
location ^~ /app/ deny all;
location ^~ /includes/ deny all;
location ^~ /lib/ deny all;
location ^~ /var/ deny all;
location /var/export/ deny all;
location /media/customer/ deny all;
location /media/downloadable/ deny all;
location ~ cron.php deny all;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /.ht
deny all;
location /.
return 404;
# Enable for custom error files
#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/admin/web/abcsports.co.uk/document_errors/;
#
location ~* "/.(htaccess
Expecting your feedback. Cheers!
add a comment |
(1) This configuration file is derived from your file and is created with the assumption that you want to force SSL on your primary domain, abcsports.co.uk. This is recommended.
(2) I moved the subdomains, "media.abcsports.co.uk, skin.abcsports.co.uk, and js.abcsports.co.uk" into separate server blocks. By default, SSL is not forced for these subdomains, but you could enable the redirections as instructed in the configuration file. Ensure that the SSL certificates for abcsports.co.uk is applicable to the subdomains before activating the SSL block for the subdomains.
(3) There could be errors. Use the error log to debug them.
(4) Backup the current vhost file because using this one. You can do this during a low traffic period.
server
listen 80;
server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# root /var/www/vhosts/abcsports.co.uk/httpdocs;
root /var/www/html/abcsports.co.uk/public_html;
location /
index index.php;
try_files $uri $uri/ /index.php?$args;
expires 30d;
access_log /var/log/nginx/abcsports.co.uk-access.log;
error_log /var/log/nginx/abcsports.co.uk-error.log;
# Enable this server block if you want to enable ssl redirection to the SSL block below. Ensure you disable the above HTTP block, you enable this block.
#server
# listen 80;
# server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# server_tokens off;
# return 301 https://$server_name$request_uri;
#
#server
#listen 443 ssl;
#server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
#root /var/www/html/abcsports.co.uk/public_html/;
#ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
#error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;
#location /
#index index.html index.php;
#try_files $uri $uri/ @handler;
expires 30d;
#
#
server
listen 80 default_server;
server_name abcsports.co.uk www.abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl;
#listen 443 http2 ssl; uncomment this line and comment line 9 if Nginx was compiled with http2
server_name abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl default_server;
#listen 443 http2 ssl default_server;
server_name www.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html;
index index.php;
access_log /var/log/nginx/abcsports.co.uk-ssl-access.log combined;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log error;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;
client_body_buffer_size 128K;
client_body_timeout 3m;
client_header_buffer_size 3m;
large_client_header_buffers 4 256k;
client_header_timeout 3m;
client_max_body_size 100M;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml
application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
#add_header Strict-Transport-Security "max-age=31536000"; #Enable this after you understand the implications of STS
location / jpg
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;
location ~ .php$
charset utf-8;
default_type text/html;
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass $phpfpm_socket;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
#fastcgi_param HTTPS $httpss; #No longer needed
fastcgi_read_timeout 300;
fastcgi_keep_conn on;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
fastcgi_index index.php;
#include /etc/nginx/fastcgi_params; #To include additional fastcgi_param
location @handler ## Magento uses a common front handler
rewrite / /index.php?$args;
# Enable to restrict access to your downloader folder
#location /downloader
#error_page 403 = @deny_downloader;
#allow xx.xx.xx.xx; #Change to your static or current dynamic IP. Restart Nginx after each modification. You can duplicate this line.
#deny all;
#index index.php;
#try_files $uri $uri/ /index.php?$args;
#
location @deny_downloader
return 303 https://www.abcsports.co.uk;
location ~ .php/
rewrite ^(.*.php)/ $1 last;
location ~ /.well-known
allow all;
## These locations would be hidden by .htaccess normally
location ^~ /app/ deny all;
location ^~ /includes/ deny all;
location ^~ /lib/ deny all;
location ^~ /var/ deny all;
location /var/export/ deny all;
location /media/customer/ deny all;
location /media/downloadable/ deny all;
location ~ cron.php deny all;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /.ht
deny all;
location /.
return 404;
# Enable for custom error files
#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/admin/web/abcsports.co.uk/document_errors/;
#
location ~* "/.(htaccess
Expecting your feedback. Cheers!
add a comment |
(1) This configuration file is derived from your file and is created with the assumption that you want to force SSL on your primary domain, abcsports.co.uk. This is recommended.
(2) I moved the subdomains, "media.abcsports.co.uk, skin.abcsports.co.uk, and js.abcsports.co.uk" into separate server blocks. By default, SSL is not forced for these subdomains, but you could enable the redirections as instructed in the configuration file. Ensure that the SSL certificates for abcsports.co.uk is applicable to the subdomains before activating the SSL block for the subdomains.
(3) There could be errors. Use the error log to debug them.
(4) Backup the current vhost file because using this one. You can do this during a low traffic period.
server
listen 80;
server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# root /var/www/vhosts/abcsports.co.uk/httpdocs;
root /var/www/html/abcsports.co.uk/public_html;
location /
index index.php;
try_files $uri $uri/ /index.php?$args;
expires 30d;
access_log /var/log/nginx/abcsports.co.uk-access.log;
error_log /var/log/nginx/abcsports.co.uk-error.log;
# Enable this server block if you want to enable ssl redirection to the SSL block below. Ensure you disable the above HTTP block, you enable this block.
#server
# listen 80;
# server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# server_tokens off;
# return 301 https://$server_name$request_uri;
#
#server
#listen 443 ssl;
#server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
#root /var/www/html/abcsports.co.uk/public_html/;
#ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
#error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;
#location /
#index index.html index.php;
#try_files $uri $uri/ @handler;
expires 30d;
#
#
server
listen 80 default_server;
server_name abcsports.co.uk www.abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl;
#listen 443 http2 ssl; uncomment this line and comment line 9 if Nginx was compiled with http2
server_name abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl default_server;
#listen 443 http2 ssl default_server;
server_name www.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html;
index index.php;
access_log /var/log/nginx/abcsports.co.uk-ssl-access.log combined;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log error;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;
client_body_buffer_size 128K;
client_body_timeout 3m;
client_header_buffer_size 3m;
large_client_header_buffers 4 256k;
client_header_timeout 3m;
client_max_body_size 100M;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml
application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
#add_header Strict-Transport-Security "max-age=31536000"; #Enable this after you understand the implications of STS
location / jpg
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;
location ~ .php$
charset utf-8;
default_type text/html;
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass $phpfpm_socket;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
#fastcgi_param HTTPS $httpss; #No longer needed
fastcgi_read_timeout 300;
fastcgi_keep_conn on;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
fastcgi_index index.php;
#include /etc/nginx/fastcgi_params; #To include additional fastcgi_param
location @handler ## Magento uses a common front handler
rewrite / /index.php?$args;
# Enable to restrict access to your downloader folder
#location /downloader
#error_page 403 = @deny_downloader;
#allow xx.xx.xx.xx; #Change to your static or current dynamic IP. Restart Nginx after each modification. You can duplicate this line.
#deny all;
#index index.php;
#try_files $uri $uri/ /index.php?$args;
#
location @deny_downloader
return 303 https://www.abcsports.co.uk;
location ~ .php/
rewrite ^(.*.php)/ $1 last;
location ~ /.well-known
allow all;
## These locations would be hidden by .htaccess normally
location ^~ /app/ deny all;
location ^~ /includes/ deny all;
location ^~ /lib/ deny all;
location ^~ /var/ deny all;
location /var/export/ deny all;
location /media/customer/ deny all;
location /media/downloadable/ deny all;
location ~ cron.php deny all;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /.ht
deny all;
location /.
return 404;
# Enable for custom error files
#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/admin/web/abcsports.co.uk/document_errors/;
#
location ~* "/.(htaccess
Expecting your feedback. Cheers!
(1) This configuration file is derived from your file and is created with the assumption that you want to force SSL on your primary domain, abcsports.co.uk. This is recommended.
(2) I moved the subdomains, "media.abcsports.co.uk, skin.abcsports.co.uk, and js.abcsports.co.uk" into separate server blocks. By default, SSL is not forced for these subdomains, but you could enable the redirections as instructed in the configuration file. Ensure that the SSL certificates for abcsports.co.uk is applicable to the subdomains before activating the SSL block for the subdomains.
(3) There could be errors. Use the error log to debug them.
(4) Backup the current vhost file because using this one. You can do this during a low traffic period.
server
listen 80;
server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# root /var/www/vhosts/abcsports.co.uk/httpdocs;
root /var/www/html/abcsports.co.uk/public_html;
location /
index index.php;
try_files $uri $uri/ /index.php?$args;
expires 30d;
access_log /var/log/nginx/abcsports.co.uk-access.log;
error_log /var/log/nginx/abcsports.co.uk-error.log;
# Enable this server block if you want to enable ssl redirection to the SSL block below. Ensure you disable the above HTTP block, you enable this block.
#server
# listen 80;
# server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
# server_tokens off;
# return 301 https://$server_name$request_uri;
#
#server
#listen 443 ssl;
#server_name media.abcsports.co.uk skin.abcsports.co.uk js.abcsports.co.uk;
#root /var/www/html/abcsports.co.uk/public_html/;
#ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key; # Ensure certificate is wildcard and applies to subdomains of abcsports.co.uk
#access_log /var/log/nginx/abcsports.co.uk-ssl-access.log;
#error_log /var/log/nginx/abcsports.co.uk-ssl-error.log;
#location /
#index index.html index.php;
#try_files $uri $uri/ @handler;
expires 30d;
#
#
server
listen 80 default_server;
server_name abcsports.co.uk www.abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl;
#listen 443 http2 ssl; uncomment this line and comment line 9 if Nginx was compiled with http2
server_name abcsports.co.uk;
server_tokens off;
return 301 https://www.abcsports.co.uk$request_uri;
server
listen 443 ssl default_server;
#listen 443 http2 ssl default_server;
server_name www.abcsports.co.uk;
root /var/www/html/abcsports.co.uk/public_html;
index index.php;
access_log /var/log/nginx/abcsports.co.uk-ssl-access.log combined;
error_log /var/log/nginx/abcsports.co.uk-ssl-error.log error;
ssl_certificate /etc/ssl/certs/abcsports.co.uk.pem;
ssl_certificate_key /etc/ssl/certs/abcsports.co.uk.key;
client_body_buffer_size 128K;
client_body_timeout 3m;
client_header_buffer_size 3m;
large_client_header_buffers 4 256k;
client_header_timeout 3m;
client_max_body_size 100M;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml
application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].(?!.*SV1)";
#add_header Strict-Transport-Security "max-age=31536000"; #Enable this after you understand the implications of STS
location / jpg
map $http_cookie $phpfpm_socket
default unix:/var/run/php-fpm/abcsports.co.uk.sock;
~adminhtml unix:/var/run/php-fpm/abcsports.co.uk-admin.sock;
location ~ .php$
charset utf-8;
default_type text/html;
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass $phpfpm_socket;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
#fastcgi_param HTTPS $httpss; #No longer needed
fastcgi_read_timeout 300;
fastcgi_keep_conn on;
fastcgi_buffer_size 32k;
fastcgi_buffers 512 32k;
fastcgi_read_timeout 300;
fastcgi_index index.php;
#include /etc/nginx/fastcgi_params; #To include additional fastcgi_param
location @handler ## Magento uses a common front handler
rewrite / /index.php?$args;
# Enable to restrict access to your downloader folder
#location /downloader
#error_page 403 = @deny_downloader;
#allow xx.xx.xx.xx; #Change to your static or current dynamic IP. Restart Nginx after each modification. You can duplicate this line.
#deny all;
#index index.php;
#try_files $uri $uri/ /index.php?$args;
#
location @deny_downloader
return 303 https://www.abcsports.co.uk;
location ~ .php/
rewrite ^(.*.php)/ $1 last;
location ~ /.well-known
allow all;
## These locations would be hidden by .htaccess normally
location ^~ /app/ deny all;
location ^~ /includes/ deny all;
location ^~ /lib/ deny all;
location ^~ /var/ deny all;
location /var/export/ deny all;
location /media/customer/ deny all;
location /media/downloadable/ deny all;
location ~ cron.php deny all;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /.ht
deny all;
location /.
return 404;
# Enable for custom error files
#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/admin/web/abcsports.co.uk/document_errors/;
#
location ~* "/.(htaccess
Expecting your feedback. Cheers!
answered May 27 '17 at 14:25
NdianabasiNdianabasi
865 bronze badges
865 bronze badges
add a comment |
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%2f176297%2f500-internal-server-error-nginx-1-12-0-on-checkout-page-after-migration-from-apa%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
could not find named location "@handler"
– MagenX
May 31 '17 at 7:09