Skip to content

Instantly share code, notes, and snippets.

View garyrojas's full-sized avatar

Gary Rojas garyrojas

View GitHub Profile
garyrojas /
Last active May 21, 2020 01:42
Magento 2 requirejs-config.js not found

After the installation you could have an error 404 at requirejs-config.js

For the solution follow next steps:

  • Edit the config file at /etc/nginx/conf.d/website.conf. Find the lines:
if ($MAGE_MODE = "production") {
   expires max;
garyrojas /
Last active February 16, 2022 15:55
Magento 2 and Nginx multiple websites looks as sub directories per website

Magento 2/Nginx Multi Website in URL segment or subdirectories

Magento has the solution by default but the project should is in the root but if your project is in a sub-folder then you will have a problem recognizing the code new websites.

For Apache the solution is an index.php and .htaccess but if you using Nginx then follow the next steps:

  1. Create root categories
  2. Create websites
  3. Create stores
  4. Create store views


Enable PHP Mail

  1. All updates installed:
sudo apt update
  1. Install the sendmail package:

Install Docker Magento on Ubuntu 18.04

Installation Instructions

  1. First, update your existing list of packages:
sudo apt update
  1. Next, install a few prerequisite packages which let apt use packages over HTTPS:
class Task extends Threaded
public $response;
public function scraping()
$content = file_get_contents('');
preg_match('~<title>(.+)</title>~', $content, $matches);
class ResizeImage {
var $image;
var $image_type;
static function makeDir($path) {
return is_dir($path) || mkdir($path, 0777, true);
function load($filename) {
$image_info = getimagesize($filename);
server {
listen 80;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;