Welcome! Log In Create A New Profile

Advanced

Setting up server block file for my laravel api endpoints

Posted by truetaurus 
Setting up server block file for my laravel api endpoints
March 14, 2019 03:38PM
When I do a request inside a node app of mine, I will do it to something like this: api.make.tube/{endpoint}

My current server block file looks like this:

server {
listen 80;

location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

server {
listen 80;
server_name api.make.tube;
root /maketube/api/public;
location / {
try_files $uri $uri/ =404;
}
}


What I am not sure is how to route that url (api.make.tube/...) to my laravel app. Anyone able to help me with this?



Edited 1 time(s). Last edit at 03/14/2019 03:48PM by truetaurus.
Re: Setting up server block file for my laravel api endpoints
March 14, 2019 04:03PM
You can close this topic.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready