Questions tagged [nginx]

Nginx is an open source web server. The nginx project started with a strong focus on high concurrency, high performance and low memory usage. Nginx is often seen as an alternative for Apache when running Magento.

Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR

I have Magento 2.4.4 running on Plesk CentOS Server. PHP 8.1 PHP FPM Enabled Varnish on Port 80 Nginx on Port 8080 and 443 Apache on Port 7080 and 7081 Most of the time the website doesn't load well ...
0 votes
1 answer
38 views

Strip index.php from rest urls

I am having this issue with an external platform which trying to get rest urls from my magento 2.4.5. Issue is that the urls they hit contain index.php inside. They are like this: https://example....
0 votes
1 answer
1k views

Permission denied error when trying to access magento2 prior to installation on Ubuntu 20.04 / nginx / php 7.4

What I've done so far, Installed nginx 1.19.6 Installed php 7.4 and all required extensions in Magento Documentation Installed and configured MySQL as per documentation, and created magentodb ...
4 votes
1 answer
2k views

Magento NGINX allow IP/deny all for downloader folder

I'm having a problem allowing my IP address access to the downloader folder when using nginx to deny all other IP's. Any ideas where I'm going wrong with the below? I've tried with my IPv4 and IPv6 ...
0 votes
1 answer
2k views

Magento 2 installation says var directory is not writable

I have a strange problem with my Magento 2 installation. The readiness check says my var-directory is not writable although it clearly is. I even set it to 777. The other directories (app/etc, pub/...
0 votes
1 answer
6k views

My NGINX configuration is now throwing 404 Not Found nginx/1.10.0 (Ubuntu) EE. 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 ...
0 votes
1 answer
1k views

Magento2 Multiple stores

I'm looking for clear solution without spikes, without creation any subfolders in pub with index files, without hardcoding cookies etc. In other words I'd like to achive multistore in magento only ...
4 votes
1 answer
4k views

Multiple Magento 2 Instances on Nginx Server Duplicate Listen

I have a dev environment where I want multiple instances of Magento 2 however when adding a second site my Nginx config throws the following error on restart: nginx[10338]: Nginx: [emerg] duplicate ...
3 votes
1 answer
1k views

Permission issue when installing with nginx

I have installed different Magento sites using nginx. I have 5 sites, 4 of them use php7.1 and there's one that uses php7.0. I have created two different sites-availaible: And both of them have ...
0 votes
1 answer
2k views

Magento 2 on nginx with another nginx as a proxy

I have a VM running ngnix with magento 2 . internally , my vm is resolved by : marketplace.corp.mycloud.com From the internet, it is resolved with : marketplace.mycloud.com Http is working fine so ...
1 vote
1 answer
2k views

What is the most battle tested official goto configuration for Magento1 using nginx?

By doing some googling I've found this as the only documentation that seemed "official" regarding Nginx. Is it really that the official Magento1 Nginx configuration only sits in this quite &...
1 vote
1 answer
1k views

M2 Varnish + Nginx (SSL not caching)

After configuring Magento 2 under SSL on every page successfully (HTTPS everywhere - Magento 2) I have found a problem on SSL since why I open this question. If I enable SSL with NGINX as a Proxy I ...
0 votes
2 answers
5k views

Magento 2 admin page not found using nginx

I have installed Magento 2 project in Ubuntu 14.04 using Nginx. After running magento setup:static-content:deploy command I can access the landing page but all URL on the page redirect to the 404 ...
2 votes
3 answers
2k views

(Pre-installation) ownership and permissions problems (CentOS / NGINX)

This is my first time installing Magento and I feel quite stupid getting stuck so early in the proces. I followed the official documentation to install Magento 2.3 by the book. Fresh CentOS 7 ...
0 votes
3 answers
36 views

Magento layout file not called?

This is my Controller Index.php <?php namespace Hikmadh\Menu\Controller\Adminhtml\Product; class Index extends \Magento\Framework\App\Action\Action { /** @var \Magento\Framework\View\Result\...
0 votes
0 answers
54 views

Nginx configuration test failed

When i tries to run sudo nginx -t this error was acquired nginx: [emerg] open() "/var/www/html/myshop/nginx.conf.sample" failed (2: No such file or directory) in /etc/nginx/sites-enabled/...
1 vote
3 answers
4k views

Magento2 with nginix + ssl + varnish admin redirect loop issue

everything working fine, but when I enable secure admin (ssl) it gives redirect loop issue. I am not able to use admin pannel also cross origin issue for front ens static content. I am using ssl over ...
1 vote
0 answers
69 views

Multi site not updating [closed]

I have site A which is the main site and site B which is multi site of Site A. I have a problem where some things are not changing on site B eg the store phone number. So I have changed the store ...
0 votes
1 answer
1k views

500 Internal Server Error nginx/1.12.0 on checkout page after Migration from Apache to Nginx

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 ...
0 votes
1 answer
1k views

Easy to Deploy 2 server setup on AWS

My client wishes to make a simple 2 server magento setup, one for the database and one for the webserver. Most AMI out there or AWS deployments are much much more complicated (and expensive!) and not ...
1 vote
1 answer
2k views

Configure php-fpm in magento2.4 correctly

php-fpm is consuming a large amount of memory, forcing the instance to restart. The server would like to know the configuration or the procedure for an ideal configuration. server: 4vcore memory: ...
2 votes
4 answers
16k views

How to enable CORs to access Magento rest APIs : Magento2

I'm getting an error while call API from Angular APP test website and app is hosted in different domain. Website Url abc.test.com Angular App : xyz.test.com When I call API for Listing Of product in ...
1 vote
1 answer
2k views

Magento 2.3 - Intergration varnish cache with, error socket :80: address already use

When I check status Varnish, always receive error : Error: Could not reopen listen socket :80: Address already in use. But, run command sudo netstat -nlpt, don't have process using port :80 ??? ...
2 votes
2 answers
6k views

Magento 2: Admin returns 404 using NGINX/PHP 7

I'm attempting to setup a local development version of Magento 2. I'm importing the database from a currently running Magento installation. The site works correctly, but I'm unable to access the admin ...
0 votes
1 answer
1k views

Rewrite rule for media images

we need to set rewrite rule for some images in Magento 2.2.5 using .htaccess rules or nginx conf Example 1 Request Path: https://www.example.com//media/catalog/product/cache/1/thumbnail/543x403/...
0 votes
2 answers
3k views

Varnish Cache not working Magento 2.3, nginx proxy and apache2 backend webservers

I have a site setup with nginx as proxy serving an apache2 server, I'm trying to implement varnish caching. nginx is listening on 443 and 80 varnish is configured to listen on 8080 apache2 is ...
0 votes
2 answers
2k views

magento with nginx not found page show as defualt one with one magento html

when i type any invlaid url it shows like below instead i want to show my website page current setting of nginx.conf (in magento root folder) root $MAGE_ROOT/pub; index index.php; autoindex off; ...
2 votes
1 answer
4k views

Why Magento is using high CPU in AWS?

I'm having a problem that is occurring after the volume of concurrent users on my site has increased. I'm currently with almost 600 concurrent users and the server is using 100% CPU. To alleviate ...
6 votes
2 answers
2k views

New website/store view, all pages 404 (including homepage)

As per the title, I've set up a new store on a different domain and all pages including the home page are returning 404. I've tried pretty much everything, and I'm wondering if any of you can think ...
1 vote
1 answer
3k views

Nginx not loading CSS and JS from Magento 2 site

Im creating a Magento 2 store based on Nginx web server, i have installed everything and i can see the site, but the JS and CSS are not loading, have done the content deploy and everything with ...
0 votes
4 answers
4k views

Magento 2.3 - Unexpected error Exception: Warning: SessionHandler::read()

I am getting Unexpected error, Exception: Warning: SessionHandler::read(): open(/var/opt/remi/php72/lib/php/session/sess_5292j25aa4ugpdgrv9r6a3l3p8, O_RDWR) failed: Permission denied (13) in /usr/...
0 votes
2 answers
256 views

Magento2.4.5 Varnish alway so 503 backend fetch fail

I have setup Vanish 6 on Magento2.4.5 but it alway show 503 backend fetch fail. My nginx config: upstream fastcgi_backend { server unix:/run/php/php8.1-fpm.sock; } server { server_name mysite....
1 vote
2 answers
22 views

Folder permission

I installed magento2 with LEMP (nginx + php8.1-fpm) magento root: /var/www/html/ I am trying to add a seperate folder and execute a phpfile inside this folder in magento root: /var/www/html/...
0 votes
2 answers
123 views

How can i install Wordpress in magento subdirectory

On my EC2, Magento is installed on main domain with nginx and now i want to install wordpress on magento subdirectory. how can i configure nginx for wordpress? Magento website: domain.com Wordpress ...
0 votes
1 answer
109 views

Magento 2 nginx 404 error permission denied on setup

I have problem with setting up project the nginx is working fine and it is setup correctly, but it gives me 404 Not Found page when I try to access the url. The log: 2022/12/06 19:01:26 [crit] 285154#...
0 votes
0 answers
72 views

Access to XMLHttpRequest at Blocked for admin and checkout page only

I'm using magento 2.4.5 nginx with varnish i want to use cdn and has set config to below section : Secure Base URL for User Media Files: https://subdomain.mysite.com/pub/media/ Secure Base URL for ...
1 vote
4 answers
655 views

Magento 2 - No cache server(s) could be purged

I try to clone a project to which was running on nginx and using varnish. I try to run it on apache2. I get this error: report.CRITICAL: No cache server(s) could be purged Cache host: company.vm:...
0 votes
0 answers
86 views

Install SSL for local magento2 project

I have installed clean magento and I want to have https:// on my local env. I am using docker and I created ssl certificate and approved it many different ways, it still not working. database changes ...
2 votes
2 answers
3k views

Create docker image for nginx, php 7, mysql and magento2

I want to create a docker image which has nginx, php7 (and required modules), mysql and magento2. Also, want to create docker-compose scripts. Any help will be appreciated.
7 votes
5 answers
13k views

Magento 2.1 Varnish Cache not Purge

I have a server with NGINX / Varnish 4 & Magento 2.1, I have setup everything need for varnish and Magento 2.1 in Stores > Configuration > Admin. Varnish is working. My problem is that if I try ...
0 votes
2 answers
355 views

Updated to magento 2.4.5 now nginx fails to start

Just upgraded to Magento 2.4.5 on Ubuntu 20.4 running nginx with a Hestia control panel. After a reboot of the server, nginx failed to restart. Running command sudo nginx -t brings up error: nginx: [...
0 votes
1 answer
82 views

Conditional webp and resizing in nginx

So regular, webp conditional loading works: map $http_accept $webp_suffix { default ""; "~*webp" ".webp"; } with small exception of pulling out of svg to ...
0 votes
2 answers
129 views

Varnish with brotli -> missing ESI handling/filtering

I've compiled brotli modules for nginx and added following (from https://www.getpagespeed.com/server-setup/varnish/varnish-brotli-done-right) to varnish default.vcl: sub vcl_recv { if(req.http....
1 vote
2 answers
195 views

Hosting Magento with Nginx getting 500 error on static files

I am currently upgrading an Magento 2.3.5 site to 2.4.4. Everything seems to going well and I have the site running in local on Docker (using Lando.dev) with nginx and the Magento nginx.conf.sample. ...
0 votes
1 answer
433 views

How to solve 502 bad gateway error?

I am trying to access my project locally and I keep getting 502 bad gateway nginx error. Funny thing is that the admin side works but, the customer view gives me this bad gateway error. I am using ...
1 vote
4 answers
2k views

No varnish headers

I install varnish(5) just like here: https://devdocs.magento.com/guides/v2.2/config-guide/varnish/config-varnish.html I make test from varnish cli varnishd -d -f /etc/varnish/default.vcl start ...
10 votes
3 answers
36k views

How to switch between PHP versions on Ubuntu Nginx [closed]

I have PHP 7.0 and 7.2 installed. For now, I use PHP 7.0. How can I switch to PHP 7.2?
11 votes
3 answers
31k views

How do I run php custom script on magento2

I wanted to add custom php script to magento2 root folder and run from the browser.I tried to add it in magento2 root folder but it redirects to 404 page. I also tried to add it in pub folder but no ...
3 votes
2 answers
1k views

Remove default store code from URL, only?

mage 2.1.7 "use Store code in URL" set to YES. Have 3 stores, one for our default/original store at "/" with code "France" and one for our south Korea and north Korea ...
1 vote
1 answer
158 views

Issue in setting multi website with two servers in Magento 2

I'm trying to setup Multi website in AWS server. I found several solution for Multi website implementation. In my case, There are two different servers(assume 0.0.0.1 and 0.0.0.2) where magento has ...

1
2 3 4 5
8