Skip to main content

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
2 answers
10 views

Magento 2: Nginx Rewrite Rule for Updated Media Base URL

I recently updated my media base URL to {{unsecure_base_url}}media/version1234567/. While attempting to create a rewrite rule in Nginx, I've encountered some difficulties. For a single URL, I used the ...
1 vote
1 answer
3k 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: ...
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 ??? ...
0 votes
1 answer
2k 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/...
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 ...
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 ...
0 votes
1 answer
35 views

Programatically logged in customer not persistent with magento 2 fpc enabled

i have created a a ajax controller which log in customer programatically after getting the otp from the customer and after getting the response i refresh the page , the problem is when full page ...
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
1 answer
2k 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 ...
1 vote
1 answer
1k views

Nginx redirect for -only- homepage of old domain, to homepage of new domain

On the server.rewrites file within the nginx/ map, I have the following logic for redirecting the homepage of an old domain, to the homepage of a new domain: if ($http_host ~ ^(www\.)?olddomain.com ) ...
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; ...
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
3k 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
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
0 answers
26 views

Magento 2 : Restrict Access to Admin

I am trying to limit access to my Magento 2 admin panel via nginx using location ~* ^/(index\.php/admin|admin) { 00.00.00.00; try_files $uri $uri/ /index.php?$args; location ~* \.php$ { ...
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
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 ...
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 ...
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 ...
3 votes
1 answer
2k 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 ...
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 ...
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 &...
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
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

Magento 2 + Nginx (connection refused)

I have issue with Magento 2 + Nginx server. My magento 2 all website page is error "ERR_CONNECTION_REFUSED". Something wrong with my server configuration? My server configuration Path: /etc/...
0 votes
0 answers
68 views

I've got 502 Bad Gateway errors only in customer login and account registration

Both customer/account/loginPost/referer/....... & /customer/account/createpost/ Lead to 502 Bad Gateway nginx/1.18.0 (Ubuntu) Interesting fact is that customers actually are able to create account ...
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 ...
0 votes
1 answer
70 views

Varnish not working with Magento 2.4.3: Website doesn't response

I have multiple website on the server and I am trying to configure Varnish cache for them. I have bypassed other sites as for now I am focusing only on the magento site i.e. magento.site. However, if ...
7 votes
4 answers
33k views

How to Solve 502 Bad Gateway error in Nginx Magento 2?

I am getting the error code 502 Bad Gateway in my Magento Installation with the following error in error log *1 upstream sent too big header while reading response header from upstream, client: 127.0....
0 votes
1 answer
38 views

http to https redirect

I've followed all the solutions found in similar issues in the forum. I have no succeed doing it. What i have: Magento 2.4.3 Varnish Cache 6 (set to work at port 80) Apache (set to work at port 8081 ...
2 votes
3 answers
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 ...
0 votes
1 answer
863 views

Execute custom php file outside /pub folder in Magento2 Nginx

I would like to execute a custom php file (required for a validation and scan) on our Magento2 installation. The file however should remain and be located in the main /var/www/html/ folder and not in ...
0 votes
1 answer
132 views

Varnish vs NGINX Cache for Magento 2

I have recently moved to Magento 2.4.4 My server currently is running on WHM with Nginx reverse proxy cache. My Magento is using the built-in Redish Full Page Cache. Recently I went to hire a ...
6 votes
4 answers
11k views

Magento wrongly redirects https!

I have a big problem with one magento installation. It is a Magento Version 1.8.0.0 running on apache with php5-fpm, a Varnish cache in front and nginx as ssl reverse proxy. If I open any URL using ...
1 vote
2 answers
5k views

nginx: [emerg] host not found in upstream "php-fpm" in /var/www/html/magento/nginx.conf.sample:50

I'm newbie to magento as well as in nginx. So I was following a youtube video which uses wsl2 in creating a magento project. So I got this error nginx: [emerg] host not found in upstream "php-fpm&...
2 votes
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 ...
9 votes
3 answers
47k views

How to configure nginx for Magento 2?

My actions: I install only: nginx 1.10.1, php7 and mysql 5.6 on ubuntu 14.04. php install: sudo apt-get install -y php7.0-fpm php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl ...
0 votes
0 answers
39 views

Magento 1.9 PHP Fatal error: Call to a member function getFrontNameByRoute() on boolean line 382

Sometimes I get this error in my Magento 1.9 but I cannot debug the reason. It happens quite rarely but I would like to find out why. Can you help me debug? this is my code at around like 382. File ...
0 votes
1 answer
268 views

Mageno 2.4.6 with Apache - Varnish - Nginx Proxy on HTTPS

System: Ubuntu 22.04 LTS Varnish Cache 7.0.3 Magento 2.4.6-p2 Ngnix 1.8 Apache 2.4 Magento (Setting Web) set Base URLs with HTTP http://magento.com Magento (Setting Web) set Base URLs (Secure) with ...
0 votes
1 answer
78 views

How I can find what values must have `MAGE_RUN_CODE` and `MAGE_RUN_TYPE` for each store/website url from db?

I am transfering a magento website and I have lost nginx settings. But I have full access in the database. In my case I want to find out upon each store url what values must have the MAGE_RUN_CODE and ...
1 vote
3 answers
4k views

Nginx Magento 2 403

Going through the magento devdocs on setting up magento 2 enterprise. Ubuntu 16.04 PHP 7.1 https://devdocs.magento.com/guides/v2.2/install-gde/prereq/nginx.html This is my issue I have worked through ...
0 votes
0 answers
33 views

Correcting 404 Error with modified_nginx.conf.sample

When trying to access my magento site I keep getting 404 errors and running sudo tail /var/log/nginx/error.log I see the following: 2023/10/19 20:26:32 [warn] 318594#318594: *166 using uninitialized &...
1 vote
1 answer
531 views

Using Magento 2 in subdirectory calling nginx.conf.sample

I looked at this question but I believe magento has changed since then I am trying to set the location block for calling magento 2.4.6-p3 from a subdirectory with the following in my nginx 1.24 server ...
0 votes
1 answer
301 views

Error 502 or Nginx takes over

Magento Installation and Network Setup: Magento 2.4.6-ps2 (server) with elasticsearch 5.8 (docker) on NGINX server is successfully installed and running on an Oracle Cloud network environment, ...
1 vote
2 answers
420 views

Can't see Magento 2 front nor admin page on excluded IP when in maintenance mode. Using Varnish

So as I said, I am trying to see my website while others see it in maintenance. BTW I have Varnish configured. What I did: magento maintenance:enable --ip=<my-ip-address> What hapened: At ...
0 votes
0 answers
115 views

Unable to run Magento site on nginx

Using Debian 11, I installed PHP 8.1, PHP-FPM 8.1, Mysql 8, NGINX, Elasticsearch, Magento2 via composer. Now I am able to see the localhost welcome Nginx page and I cant navigate to Magento site. I ...
0 votes
2 answers
262 views

very confused about Varnish. Is it running or not? no headers it only says Pregma: cache

Maybe someone can help: on Ubuntu, nginx, latest magento (2.4.6), varnish 6 This is my Nginx conf setup: server { listen 8080 default_server; listen [::]:8080 default_server; listen 443 ...
0 votes
1 answer
609 views

unable to access newly created domain in nginx on ubuntu

recently was setting up Magento in my local system, I did installed MariaDB, nginx and php7.1. I did created new files in sites-available and did symlink as well. And I did run nginx -t there were no ...
0 votes
1 answer
93 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
3 answers
37 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\...

1
2 3 4 5
8