Questions tagged [nginx]

Nginx, known as a versatile web and proxy server, serves numerous functions in the digital realm. However, it is important to note that queries related to server software utilization and customization might not be directly tied to programming and could be deemed irrelevant for this platform. In such cases, exploring alternative outlets like Newtab Q&A, Newtab Q&A, or Webmasters on Newtab Q&A would prove to be more fitting venues for seeking expert advice.

Unable to access Nginx when attempting to send a post request with a JSON payload that includes a base64 string

Whenever I attempt to send a post request with json data: { "img":"base64code..." } I encounter two different errors: 2018/04/14 00:43:21 [crit] 2737#0: *1770 open() "/opt/bitnami/nginx/tmp/client_body/8/01/0000000018" failed (13: Permission ...

Implementing a separated front-end and back-end for an application

My web app consists of two separate components: An API built on the Place Framework that handles requests of type /api/* for any client. A decoupled front end created with AngularJS using grunt build. Currently, the front end communicates with the API. ...

Nginx and Node.js: A Powerful Web Server Combination

I've been searching for the solution for the past couple of days and I can't seem to figure it out. I have a node application that is utilizing socket io, residing in a subdomain which is nested under multiple folders https://my.example.com/node/app1/. Eve ...

Using React Router in conjunction with Nginx

I've been struggling to configure nginx with react router. Despite trying various suggested solutions, none of them seem to address my specific case. Here is the directory structure on my filesystem served by nginx /path/to/my/app |- v1.0/index.html ...

The functionality of sockets is currently experiencing issues on the production environment when used in conjunction

I'm having trouble getting my angular project to work on production. Sockets are not functioning properly when I deploy the project on my Ubuntu 20.04 server. Everything works fine on localhost, but when I access the website on my server, I get an ERR_CONN ...

What is the process for integrating a Next.js route into a PHP-powered website on an Nginx server?

I attempted to develop a PHP-powered website on my Ubuntu system alongside a Next.js website. Here is what I have tried: Let's say I have a PHP website located at mysite.com with 2 pages: mysite.com/ & mysite.com/about.php Simultaneously, I have a Ne ...

I noticed that my node.js application is intermittently throwing an Unhandled 'error' event when processing write requests, shortly after I configured it to run behind Nginx

Having been successfully running node.js(0.8.20 and 0.9.10) on Windows Server 2012 for weeks without any issues, I recently added Nginx(1.2.6) to the mix. However, after configuring Nginx as follows: #user nobody; worker_processes 1; #error_log logs/e ...

The ongoing battle for routing supremacy between Express and Nginx

My current setup involves a unique configuration that I'll need to maintain until I have the opportunity to refactor the project later this year. Right now, it's a static index.html landing page being served with a root location "/" by NGINX. I& ...

Encountering: ERR_SSL_PROTOCOL_ERROR nginx with vue.js

When I check the console log in Google Chrome, I am encountering these errors: GET https://192.168.1.7:8081/sockjs-node/info?t=1579798623564 net::ERR_SSL_PROTOCOL_ERROR GET https://192.168.1.7/sockjs-node/info?t=1579798623562 net::ERR_CERT_COMMON_NAME_I ...

Setting up an angular2 web application on an Nginx server and forwarding HTTP requests to the backend API for

Seeking assistance with setting up angular2 routes and proxying http requests to a rest api on a separate server Currently, I have an angular2 web application running on an nginx server which serves the static html files. The rest api that the application ...

Getting around relative paths in an Angular application hosted by NGINX

I am using NGINX to host my Angular application. The frontend is accessible at http://localhost/, and the backend can be accessed at http://localhost/api/. While most of my configuration works correctly, I am encountering an issue with a relative path in a ...

Setting up a .NetCore3.1 API on LinuxCentos with Nginx

Currently, I am facing an issue while attempting to deploy a .NET Core 3.1 API + Angular application on Linux Centos. The application runs fine on the server; however, the browser fails to load it properly. Surprisingly, when I publish the same project for ...

Issue with Nginx causing 404 errors on NextJs API routes

I encountered a problem with my NextJs API returning a 404 error during a page reload in production when executed from getInitialProps. The error message in my PM2 logs indicated that the 404 not found response was coming from Nginx. It appears that NGIN ...

No data in Django json request.body

I'm currently working with an API that requires sending a callback to a specific URL. I have configured my URL and view as follows: def get_callback(request): ... some processing with request.body Despite setting up the view, when I check the req ...

Enabling SSL for a Node.js and React.js application

My experience with production in nodejs & reactjs is limited, but I recently learned about the importance of implementing SSL. After doing some research, I found this code snippet for ExpressJS: function requireHTTPS(req, res, next) { if (!req.secure & ...

Axios failing to include Content-Type in header

I have set up an Odoo instance in the backend and developed a custom module that includes a web controller. Here is the code for the web controller: Web Controller # -*- coding: utf-8 -*- from odoo import http import odoo from odoo.http import Response, ...

Determining the operational duration of a PHP script catering web content

I am currently conducting tests on the performance of various PHP scripts that are responsible for serving web content on my website. However, I have been encountering inconsistent results during these tests. To measure and log the execution time, I save ...

Is it necessary to mandate HTTPS usage for users on load balancers or web servers in terms of HSTS?

My current setup involves: 1.) 1 load balancing server running nginx 2.) 2 web servers powered by express.js on node.js 3.) 1 dedicated database server Hello there! I've been investigating ways to enforce HTTPS usage for my users. After researching var ...

Using Drupal 8 with Nginx as a reverse proxy in a subdirectory configuration

Our web server is currently running Drupal 8 on nginx + php-fpm. We are looking to implement a reverse proxy server to make the D8 website accessible at www.somedomain.com/drupal8 The nginx configuration is functioning correctly: location /article_dev/ { ...

Guide to deploying a Next.js static export using Nginx: Troubleshooting deep link issues

After exporting my Next.js project to the out folder, I noticed a specific folder structure: out index.html terms.html privacy.html To serve these files using nginx, I configured it as follows: server { root /var/www/myproject/out; index index.h ...

What are the steps to set up a MEVN project to run on an intranet using nginx?

As a newcomer to the world of Vue, Node, Express, and MongoDB API while using Nginx, I have a question about where to place the port configuration. Can anyone provide insight on this? My project consists of a "client" folder and a "server" folder, both co ...

Encountering SocketIO Connection Issue in NodeJS and NginX Configuration

Every time I attempt to access my nodejs application utilizing nginx, I encounter the ensuing error: 2015/04/20 22:34:08 [error] 29607#0: *1 connect() failed (111: Connection refused) while trying to connect to upstream, client: myipaddress, server: ...

How to redirect users from page.php to a different page using nginx

Here is the current server block configuration I am using: server { listen 80; server_name petpal.co.il; root /usr/share/nginx/petpal; index index.php; rewrite ^/([a-zA-Z]+)\-([0-9\-]+)$ /$1.php?page=$2? last; rewrite ^/e ...

Unable to utilize routes in Express.JS when integrated with nginx

After setting up nginx in front of Express.JS, everything seemed to be running smoothly. However, I encountered an issue when trying to access website.com/users, which resulted in a 404 Not Found error. It appears that accessing website.com works fine, but ...

URL Rewrite Causing Path Problem

Encountering an issue with URL REWRITING on my Debian/Nginx/PHP server. Screenshot of the image issue Facing problems with displaying images. My Project Structure Class css img ... and the file.php here Non-functional Approach / Functional Approach Th ...

Sending requests from a React application to a Node.js backend hosted on an Nginx server with SSL enabled

After creating static files for a reactjs app using the create react app tool, I launched an nginx server on a docker container to serve the front end built with reactjs. This nginx server communicates with a node js in another container. Everything was r ...

Deploying static files with Django in a production environment

My Django application is functioning properly on Ubuntu 14.04 with nginx 1.10, Django 1.10.2, and uWSGI 2.0.14. It is able to load static files such as JavaScript, CSS, and images, but the CSS files are not being applied to my website. Below is the configu ...

Implement Next.js deployment on NGINX server with a 403 forbidden error

I am currently utilizing Next.js for the frontend and Django for the backend. During development, everything is functioning properly. However, when transitioning to production, I am encountering a 403 Forbidden Error related to /_next/static/chunks. It app ...

Configuring multiple ports with SSL certificate for a single domain name on NGINX

I have developed a website that relies on a Rest API to fetch all its data. The website is secured with an SSL certificate. Here is how my default file (etc/nginx/sites-enabled/default) is structured: server { listen 80; server_name example.com; ...

Is it possible to launch my MEAN application on a personal server running Debian and nginx?

After successfully creating my first app using the MEAN stack (Mongo, Express, Angular 2/4, Node), I am facing an issue where it only functions on my local environment. When I initiate the client (frontend) part with 'ng serve,' it works on local ...

Setting up an NGINX server to route requests to a node server without a specified path

I have a server running Nginx with the following setup: server { listen 80; server_name example.ca www.example.ca; location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header ...

Experiencing a Cross-Origin Resource Sharing (CORS) error when attempting to establish a connection between a Spring Boot application and React, and

I've encountered an issue with my deployment setup involving a React application on NGINX running on port 9000 and a Spring Boot WAR file deployed on Tomcat server on port 8081. Despite enabling global CORS in Spring Boot, I'm still facing difficulties as ...

Leveraging nginx for serving dynamic content

I recently utilized nginx to host my node.js application. After creating a build of the app, I configured the root directory in my nginx.conf file to point to the location of the build folder. It was successful, and my application ran smoothly on nginx. H ...

Issue with Nginx setup - Unable to establish connection between three distinct servers (Client, API, Database)

What I am attempting to achieve I am currently working on setting up a connection between three individual servers (Client, API, and mySQL) by creating three VMs locally with the following IP addresses. Below is a simple testing React/Node code for each s ...

The NGINX reverse proxy fails to forward requests to an Express application

I am currently in the process of setting up a dedicated API backend for a website that operates on /mypath, but I am encountering issues with NGINX not properly proxying requests. Below is the nginx configuration located within the sites-enabled directory ...

Setting up AWS Elastic Beanstalk for a Laravel application with customized Nginx configuration

Recently AWS has made a change in the Elastic Beanstalk PHP environment by switching to Amazon Linux 2 and replacing Apache with Nginx. I have been facing challenges in configuring my Laravel project to function properly. Previously, I could simply add som ...

The Next.js dynamic route in production is displaying a 403 error instead of the expected 404. What might be causing this issue?

Whenever I attempt to access https://site.con/categories/, I am greeted with a 403 Forbidden error. However, if I visit https://site.con/categories/sport, everything works perfectly fine, and all other routes function properly. What could potentially be ca ...

Nginx deployment of React causes issues with AJAX Axios functionality

I am interested in integrating frontend with backend on cloud virtual machines such as DigitalOcean, AWS, or Microsoft Azure. Frontend: React Backend: Spring Spring MVC Mybatis + Tomcat (Excluding Spring Boot) After researching various methods using N ...

Encountering a cross-origin resource sharing (CORS) issue on NodeJS or Nginx server

After conducting thorough research on the topic following the formulation of this question, it has come to my attention that there are numerous queries similar to mine. However, I firmly believe the issue at hand here is distinct: No 'Access-Control- ...

Error loading resource in Vue npm run serve: net::ERR_CONTENT_LENGTH_MISMATCH

I am encountering the following error message in Google Chrome console: Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH chunk-vendors.js:1 This results in a blank page when attempting to load a Vue development page initiated with: user@ubuntu:~# ...

Encountering unforeseen challenges when implementing Angular routing alongside NGINX routing

I have developed an Angular single page application that utilizes HTML routing and ng-route. This means that all the pages can be accessed through links such as: example.com/products example.com/home However, I also have a blog section on my website whic ...

Creating a Docker image for NextJS with an nginx server

Exploring the realm of Docker as a newbie, I am immersing myself in its official documentation. My current venture involves fashioning a NextJS build with a docker image tailored for an nginx server, and here is my roadmap: Commencing by installing the es ...

What are the steps for transitioning a HTTP stream to HTTPS?

Currently, my website operates on HTTPS through a public hoster and is connected to a Raspberry PI running a node server. In the same network as the PI, there is a hardware component (referred to as decoder) that transmits a data stream via TCP. The purpo ...

The admin-ajax.php file in Wordpress is sending back php code instead of the expected json format

How do I configure WordPress to return JSON on Nginx? When making Ajax calls in my WordPress site, instead of receiving plain JSON, I see <?php JSON. Everything works fine on the site, except for admin-ajax calls. Example of a regular call: https://i. ...

Unable to connect domain name to IP address (No display is shown)

I recently purchased a domain () through Google Domains. However, when I try to open it in Chromium or Firefox, I receive an error message: ERR_CONNECTION_REFUSED. Here is my current setup: I have an EC2 AWS machine running my nodeJS backend on port 3000 ...

Angular Universal functioning fine on local host, yet encountering issues on Nginx Server

I recently developed a project with Angular Universal. After building the project, it generated files such as browser, server, server.js, and prerender.js. I am curious to learn how I can run this project on an nginx server. Currently, I create a build o ...

The reverse proxy in nginx is having trouble accessing custom paths within the loopback network

Running my loopback app on the server and attempting to access it via an nginx reverse proxy has been a challenge. Unfortunately, I'm quite new to nginx and struggling to configure it correctly. Below is a snippet from my config file /etc/nginx/sites- ...

Deployment of the website resulted in a NextJS 500 internal server error, yet the build functions flawlessly when tested locally

Everything runs flawlessly on my personal computer using pm2. There are no errors, every page loads perfectly, and fetching files does not result in any 404 or 500 errors. It's absolutely fantastic! This is exactly how I envision it working. However, when ...

The progress bar for uploading in Docker with Nginx and PHP-fpm is not functioning correctly

Currently, I am employing docker-compose with PHP 7.2 from the phpdockerio/php72-fpm:latest image. services: webserver: image: nginx:alpine The configuration for nginx is as follows in nginx.conf: user nginx; pid /var/run/nginx.pid; ev ...

Incorporating next.js static assets within a docker environment with nginx

My blog application built with next.js is running inside a docker container. The container can be accessed on port 5000. Despite having set assetPrefix:'/blog' in the next.config file, the browser is struggling to load the assets like CSS and JS files. T ...

The interaction between Postgres and express.js seems to be malfunctioning when using Ubuntu environment variables

My PERN Stack is encountering an issue with the error message 'password authentication failed for user "postgres"'. In my postgres (14.8) setup on Ubuntu 22.04.2, I am able to log into postgres using either the (Ubuntu) users ubuntu or postgres, ...

Nginx is responsible for handling files for routes that are not found within the AngularJS application

I have successfully created an AngularJS app (v1) that is packaged as a Docker image with Nginx as the web server. I need the app to display index.html when users navigate to http://localhost:5000/content and login.html when they go to http://localhost:500 ...

Launching a Node.js application on Elastic Beanstalk

After deploying my Node.JS app to Elastic beanstalk, I am encountering a nginx 502 bad gateway error. The application functions correctly locally. Despite following the instructions in the tutorial (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/c ...

The WebSocket connection in the browser, when accessed through a remote server, typically shows a CLOSED state in the readyState property during the on

Local server operations are running smoothly. However, when testing on a remote server with Nginx, the issue arises where the readyState inside the event handler onopen is consistently showing as CLOSED. Nginx configuration: server { server_name doma ...

The elusive 404 error strikes again as the Nginx server frantically searches for the default path 'etc/nginx/html/index.html' within the NextJS application

I've been struggling with a persistent 404 issue for days now and could really use some assistance. My system is CentOS7 (CPanel, VPS) with engintron for the nginx reverse proxy and pm2 to run my next.js application. default.conf server { listen ...

Steps for deploying NextJS into a subdirectory instead of the root directory

Recently, I delved into the world of Next.js in my quest to create an SEO friendly website using React. Everything was going smoothly until a roadblock appeared. The issue pertains to deploying a Next.js app into a directory that is not the root directory ...

Using Nginx and Express to deliver static content directly from a Docker container

My setup involves an Express API and an Nginx running in a Docker Container. The goal is to have Nginx reverse proxy regular requests to the API, while also serving static files like images directly. However, I'm struggling to determine the correct URI to ...

Is it possible to configure Nginx mime types within a Docker container?

My docker-compose.yml file looks like this: version: "1.0" services: web: container_name: webserver image: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - ./frontend:/frontend ports: - "8001:80&qu ...

How can I transform IIS rewrite rules into Nginx rewrite syntax?

I am in the process of converting an IIS rewrite rule into Nginx rewrite syntax. Specifically, I need to rewrite a URL such as /leaderboard to /pages.php?page=leaderboard. This is the current IIS Rewrite Rule I have: <match url="^([^/]+)/?$" / ...

My attempts to implement multi-container service deployment using NextJS and a backend node app have been unsuccessful

Currently, I am delving into the world of docker. Within my repertoire, I possess a mix of a next.js app and a node.js app. Within my next.js application, specifically in page.tsx, I have incorporated a call to my backend API. export const revalidate = 0; ...

The strange behavior of WordPress's wp-admin interface

I set up a WP docker container that is officially provided. It's currently running alongside an nginx instance. Below is the content of the .htaccess file that I have added to the container: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / R ...

Encountering connection closure while using the http GET method in a Node.js application with Express framework

My issue involves receiving a connection close header in response when making a GET request, but the connection remains keep-alive for POST requests. My current setup includes an AWS ALB directing traffic to EKS. Within EKS, there is an NGINX ingress rout ...

Setting Up PhpMyAdmin with NGINX on Windows

After embarking on setting up a server with NGINX today, I successfully configured PHP and MySQL. Everything seems to be going smoothly so far. However, I am facing an issue with getting NGINX to open PhpMyAdmin (previously located in the root directory [E ...

Set up Nginx to host Angular static files and act as a reverse proxy for express

Recently, I've started using Nginx for serving static Angular files and proxying to a backend Express server. Both the frontend (with Nginx) and backend are dockerized. My frontend consists of a button that makes a request to fetch data from Express. Howe ...

Utilize Docker on AWS for seamless deployment and execution

After completing my React and NodeJS projects, I created a Dockerfile for each one and then a docker-compose file to generate docker images for both the frontend and backend. I have also uploaded the images to my repository on Docker hub. Now, I want to r ...

Encountering CORS issue while trying to connect frontend with microservice API in a production environment

I am encountering CORS issues in my production environment with a microservice-based application that functions smoothly in development. Whenever my frontend attempts to send a request to the ApiGateway, I encounter the following error: Access to XMLHttpRe ...

Error encountered in Express.js application with nginx configuration while serving static files from a subdirectory

upstream app { server localhost:3000; } server { ... # The dilemma I'm facing location ~* \.(?:jpg|jpeg|png|gif|swf|xml|txt|css|js)$ { expires 6004800; add_header Pragma public; add_header Cache-Control " ...

ExpressJS exhibits unique behavior based on whether the API is requested with or without the specified PORT number

I have encountered an issue with my 2 flutter web apps. One of them is functioning flawlessly when I request the URL, but the other one only works when I include the port xxxxx:4000/nexus-vote. However, when I remove the port, I receive a status code of 20 ...

Guide to creating HTML file with SSI tags

Currently, my website uses Nginx SSI tags to dynamically include template files such as the header, footer, and sidebar. However, I need to provide the final HTML output to clients instead of running it on their browsers. The issue I'm facing is that ...

CORS blocked the HTTP request due to the absence of the Access-Control-Allow-Origin header, although the header is actually present

Recently, I encountered an issue while working on a project using Python with Flask. I had created a REST API and needed my Vue app to interact with it and fetch data. However, I kept receiving an error message stating "No 'Access-Control-Allow-Origin' hea ...

Application fails to launch after disabling unsafe-eval in the restricted Content Security Policy settings

Description My application is facing issues due to having a restricted CSP policy that does not allow unsafe-eval for scripts. When I add a Content-Security-Policy header without unsafe-eval, my application fails to load. Minimal Reproduction The restric ...

Issues encountered when trying to deploy Strapi on a Digital Ocean Droplet due to a breach of the specified Content Security Policy directive: "connect-src 'self' https:'

I recently started using Digital Ocean and am in the process of deploying strapi for production. After successfully setting up a new Digital Ocean droplet running Ubuntu 20, I installed Node.js on it. I also added Nginx, although I'm unsure if it&apo ...

Obtaining the true client IP address in a Dockerized Next.js and Nestjs application instead of the Nginx Container's IP Address | Utilizing X-Forwarded-For

I have successfully Dockerized both Next.js 13 (front end) and Nestjs (API), with a reverse proxy set up using the nginx-proxy image. Below is my configuration in the docker-compose.yml: api: image: gidgud/my:api container_name: api ports: ...

Encountered an issue launching the advanced web server and reverse proxy server nginx for high performance

UPDATE - Recently, I encountered the following error logs: nginx: [emerg] unknown "request_url" variable Aug 19 01:14:58 nginx[4890]: nginx: configuration file /etc/nginx/nginx.conf test failed Below is my nginx.conf file: user www-data; worker ...

NGINX server_name malfunctioning

Whenever I try to access my website, it always opens with the localhost path instead of the correct domain name specified in my server configuration. How can I resolve this issue? View Configuration Image #user nobody; worker_processes 1; #error_log ...