Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Setting up server block file for my laravel api endpoints

$
0
0
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?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>