Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Nuxt Use Nginx as reverse Proxy

map $sent_http_content_type $expires {
    "text/html"                 epoch;
    "text/html; charset=utf-8"  epoch;
    default                     off;
}

server {
    listen          80;             # the port nginx is listening on
    server_name     your-domain;    # setup your domain here

    gzip            on;
    gzip_types      text/plain application/xml text/css application/javascript;
    gzip_min_length 1000;

    location / {
        expires $expires;

        proxy_redirect                      off;
        proxy_set_header Host               $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_read_timeout          1m;
        proxy_connect_timeout       1m;
        proxy_pass                          http://127.0.0.1:3000; # set the address of the Node.js instance here
    }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript Display Time Every 3 Second 
Javascript :: reactt split a value and sepate 
Javascript :: remove parent element javascript 
Javascript :: upload multiple image using jquery 
Javascript :: js after settimeout 
Javascript :: clear inteval 
Javascript :: javascript stack reverse 
Javascript :: set map to local storage javascript 
Javascript :: random word react npm package 
Javascript :: json remove &#34 
Javascript :: how to create object js 
Javascript :: react native shadow maker 
Javascript :: angular router navigate inside setTimeout 
Javascript :: to 2 decimal places javascript 
Javascript :: react native image zoom viewer 
Javascript :: import ipcrenderer in react 
Javascript :: of() angular 
Javascript :: js check if object key exists 
Javascript :: Vue Chartjs label false 
Javascript :: nodejs module 
Javascript :: redirect using expressjs 
Javascript :: angular set attribute value dynamically 
Javascript :: can be converted to number js 
Javascript :: Material-ui Adb icon 
Javascript :: interactive svg javascript 
Javascript :: Split string on the first white space occurrence 
Javascript :: js string insert space 
Javascript :: count duplicate array javascript 
Javascript :: split() js 
Javascript :: how to add key value pair in object 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =