score:0
Accepted answer
a reverse proxy should work but it's not acceptable to use it for production server, please look over other solutions for that
server {
listen 80;
listen [::]:80;
server_name xxx.xxx.x.x;
root /var/www/my-site;
index index.html;
gzip on;
gzip_comp_level 3;
gzip_types text/plain text/css application/javascript image/ ;
location /my-site/ {
proxy_pass http://localhost:5000 ;
proxy_http_version 1.1;
proxy_set_header upgrade $http_upgrade;
proxy_set_header connection 'upgrade';
proxy_set_header host $host;
proxy_cache_bypass $http_upgrade;
}
}
more on reverse proxies here
Source: stackoverflow.com
Related Query
- Trouble deploying React app on static Nginx server
- CORs error AFTER deploying React App and separate Node API to production Unbuntu server where React static files are servered with NGINX
- how to share environment variables between react app and express js server hosting it as static site
- How do I configure my Nginx server to work with a React app in a subfolder?
- Deploying ASP.NET Core 2.1 React App on IIS server
- Connect React App served on dockerized Nginx to Express server
- Deploying React App to Apache Server
- Hosting a React app with React Router on a static server
- unable to deploying react app under subdirectory on nginx running in docker container
- Deploying React (3000) and Express (8000) app on the apache server
- MIME type checking failure when deploying the React App on the server
- React front-end app on nginx server cannot reach the nodejs back-end
- Why is my nginx routing my react app static files to my index.html
- Deploying a React + NodeJS + Express + MySQL App to Heroku only deploying the Server Not the React
- Deploying react app with webpack server
- Nginx 500 Interal Server Error with React app - 1 rewrite or internal redirection cycle while internally redirecting to "/index.html"
- Trouble hosting react app at location using docker nginx
- Having issues displaying react app on nginx server at domain
- Having some trouble deploying react app and express/node.js backend on same port
- Use nginx to serve static react files a remote server localhost
- having trouble deploying react app with mongo db to heroku
- Node Version Trouble deploying React app onto GCP
- Deploying React App on IIS8 Windows server (Azure VM)
- How to deploy a React App on Apache web server
- How to inject API server URL when deploying react frontend?
- Error when deploying react app and it keeps sayings << Plugin "react" was conflicted between "package.json » eslint-config-react-app » >>
- Azure App Service Getting error while deploying REACT JS application
- Github pages still shows README after deploying React app
- Getting 403 ACCESS DENIED error when deploying React Web app on AWS Amplify
- How to export react app to pure static html
More Query from same tag
- React change CSS with input
- React: how to add css transition into inline style
- Equivalent of Ahead Of Time Compilation in React
- SVG Marker gets rendered differently on different screens
- Axios Request Interceptors - Do Something on Request Completion
- "TypeError: Object(...) is not a function" error when trying to use react hooks (alpha)
- react Carousel from scratch logic with visibility
- Why does it require authentication to load DB values?
- How to apply class to an external component that does not support className?
- React Router 4 organizing routes
- React setState inside function doesn't get read the first time
- How can I implement a movie player on ReactPlayer with presigned cookies from AWS S3
- Why can't I receive ref in componentDidMount?(React)
- How to use "this" variables in stateless component to handle mouse events
- How can I clear the state in React.js?
- data structure to store single parent family tree in react
- React event handling between Child and Parent Component
- React onSubmit placement
- Can't track down possible import/export error - React/ES6 modules
- Rails 4 + react-rails gem: Could not find generator 'react:install'
- React unique key when mapping warning
- Mapping data from mongoDB to Mat UI DataGrid
- add number between string then render it in react.js
- React/Javascript: Chaining together filters together
- Express JS conditional routing -How to route Multiple payment gateways?
- Error compiling NextJS & Sass Global stylesheets when deploying to Vercel
- How to add multiple stylesheets to ctx.renderPage?
- ESLint simple react App.js Unexpected newline after parentheses function-paren-newline
- State in react is not rendering/displaying to the screen
- TypeError: Cannot read property 'score' of undefined in redux