The website is functioning properly on port 8080, however, it is not working on the root directory

My website is functioning properly with the domain name test.in:8080, however it is not working on just test.in. Here is an excerpt from my nginx.conf file for reference:

server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  digitaloceantwo.25o2.in;
        root         /usr/share/nginx/html;

        # Include configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {
        proxy_set_header   X-Forwarded-For $remote_addr;
        proxy_set_header   Host $http_host;
        proxy_pass         "http://digitaloceantwo.25o2.in:8080";
        }

}

The site is accessible via ip-address:8080 but not through 'digitaloceantwo.25o2.in'.

Answer №1

Utilize as a tool to assist in configuring your files.

All you require is a basic reverse proxy setup.

Answer №2

Consider implementing the following configuration under root /usr/share/nginx/html;

index index.html;
location / {
      try_files $uri /index.html;
    }

Subsequently, execute:

- nginx -t (to check if it is okay), then proceed with:
-service nginx reload
-service nginx restart

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Created using Node.js version 10, this revolutionary React application is taking the

I inherited a main react application that hosts several other react applications. As new applications continue to be developed, I became concerned about the use of nodejs10 for each new project. Is it possible that issues may arise in the future due to t ...

The parameter value experiences an abrupt and immediate transformation

I recently created an electron app using Node.js and encountered a peculiar issue that I am unable to resolve: Below is the object that I passed as input: { lessons: [ name: "math", scores: [90, 96, 76], isEmpty: false ] } ...

Retrieve information using the GET method in REST API

I have a JSON file containing various data fields such as name, roll number, address, and mobile number. I am looking to display only the roll number and address information from this file using node.js. Can someone provide instructions on how to achieve ...

Converting POST data into an array using Angular

I am facing an issue with my post request setup in a NodeJS app. The data sent returns as an array, but I am struggling to convert it into the desired format. My Angular code is structured as follows: newWord = ''; keyword = ''; onCli ...

Simulating NestJS Injected Connection Imported from Another Module

Today, I've been facing this persistent error: Encountering an issue with the ClubsService where Nest is unable to resolve dependencies (specifically DatabaseConnection). The error message prompts me to ensure that the argument DatabaseConnection at i ...

Inject data into Hapi 17 redirection

I have configured a route to switch the locale for users and redirect them back to the page they were on. The locale is passed as a parameter in the URL. After some database operations, I need to pass on the result of the query to the redirected page. Ho ...

Implementing a rate limit on the login API that is specific to individual IP addresses rather than being

I have successfully implemented the [email protected] module, but I am facing an issue where it is blocking the API globally instead of for a specific API that is receiving hits. This is my current code: const limiter = new RateLimit({ windo ...

Error [ERR_MODULE_NOT_FOUND]: Module could not be located in vscode

Issue with VS Code: Module Not Found Error View the image associated with the erroreN.png ...

Is it possible to utilize a single node_modules folder for multiple Angular 2/4 projects?

As I dive into the world of Angular, I've noticed that creating a new project can be time-consuming due to the 100MB "node_modules" folder that the CLI generates. The contents of this folder are repetitively consistent across projects, with few change ...

The JSON.stringify method may not accurately reflect the original object that was converted into a string

Working on a Connect Four app for my school project has been an interesting challenge. At the moment, I am grappling with JSON.stringify and trying to encode an object that holds a two-dimensional array of "hole" objects to eventually send it to the server ...

How can strings of dates be arranged in MM/DD/YYYY order?

Is there a correct way to sort these dates in descending order? I've attempted using arr.sort() and arr.sort().reverse(), searched extensively on stack overflow, but still cannot find a solution. Every attempt at sorting them seems to be incorrect. [ ...

What is the process for transferring an object to a different file?

Currently, I am working on a web application using Node.js. In my project, I have two main files. The first one is Server.js, where I handle server actions such as going online. The second file contains a large object filled with data. I successfully impo ...

listening for new messages on discord using a loop in discord.js

My Discord.js bot is experiencing an issue where the callback function for the "message" event is not triggering inside a loop in my code, despite working correctly everywhere else. I've tried using console.log statements for debugging but haven' ...

Iterating through the startPrivateConversation method in Botkit for a multitude of users

In order to send an update to all my users, I created a new bot controller in a separate js file. To achieve this successfully, I needed to implement a notification function inside the controller's rtm_open function. The goal was to iterate through th ...

The redirection feature in nodejs/expressjs does not seem to function properly

I attempted to use the redirect function in expressjs to serve a webpage, but for some reason it's not functioning properly. I must be missing something here. index.html: <html> <body> <div id="clicked"> not clicked </div&g ...

issue encountered while attempting to submit a comment on the post path

I am fairly new to backend development and whenever I try to post a comment, I encounter the following error in the console (I'm aware that the code is messy but it looks better in VS Code). { comments: [ { _id: 5b570970beff3674bc8e851d, ...

What are the steps for containerizing a Vue.js application?

When attempting to access the site locally through on Chrome, I receive an error message stating "172.17.0.2 took too long to respond". To retrieve the IP address of the container, I used the inspect command. docker inspect -f '{{range .NetworkSett ...

Using Nodemon with Babel causes the server to constantly restart

Within my package.json, I have a start-script that I utilize in my development environment. This is how it looks: "scripts": { "dev": "NODE_PATH=src nodemon --watch src/ --exec babel-node src/app.js" } Upon running npm run dev, everything runs smooth ...

Tips for converting an image URL into a BLOB datatype in Mysql

I am facing an issue where I need to convert a URL (such as ) that is stored in a varchar column into a blob column in the same table, using only MySQL. My objective is to store the image directly in my table because there's a possibility that the URL ...

Tips for resolving the npm ResourceUnavailable issue

Hey there! I'm currently experimenting with React. In my folder, I've got nodejs along with npm and npx files installed. While debugging, I've deleted and reinstalled this folder multiple times. However, no matter what directory or command I ...