Skip to content

Instantly share code, notes, and snippets.

@jamesallan93
Last active May 25, 2022 22:10
Show Gist options
  • Save jamesallan93/3becd1ca19bbdeceb53ceb7847b9780f to your computer and use it in GitHub Desktop.
Save jamesallan93/3becd1ca19bbdeceb53ceb7847b9780f to your computer and use it in GitHub Desktop.

Revisions

  1. jamesallan93 revised this gist May 25, 2022. No changes.
  2. jamesallan93 revised this gist May 25, 2022. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions lorem.io
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@ map $sent_http_content_type $expires {
    default off;
    }


    server {
    listen 80;
    server_name lorem.io www.lorem.io;
    @@ -36,8 +35,6 @@ server {
    location ~ \.php$ {
    fastcgi_pass unix:/run/php/php8.1-fpm.sock;



    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    #include fastcgi_params;
    include snippets/fastcgi-php.conf;
  3. jamesallan93 revised this gist May 25, 2022. No changes.
  4. jamesallan93 created this gist May 25, 2022.
    49 changes: 49 additions & 0 deletions lorem.io
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    map $sent_http_content_type $expires {
    "text/html" epoch;
    "text/html; charset=utf-8" epoch;
    default off;
    }


    server {
    listen 80;
    server_name lorem.io www.lorem.io;
    root /home/joedoe/Documents/projects/MY_PROJECT/backend/public;

    index index.html index.htm index.php;

    location /api/ {
    root /home/joedoe/Documents/projects/MY_PROJECT/backend/public;
    try_files $uri /index.php$is_args$args;
    }

    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://localhost:3000; # set the address of the Node.js instance here

    #try_files $uri /index.html;

    }

    location ~ \.php$ {
    fastcgi_pass unix:/run/php/php8.1-fpm.sock;



    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    #include fastcgi_params;
    include snippets/fastcgi-php.conf;
    }

    location ~ /\.ht {
    deny all;
    }
    }