Skip to content

Tag: nginx

Docker nginx php permissions issue

I’m just learning Docker and took on a little pet project and wondering if something is possible permission wise with docker/nginx/php. I’m attempting to convert an old IIS-Windows/php/MySql project of mine to Docker/nginx/php/mysql I’m most of the way there and have the 3 containers linked …

Validation URL information with nginx

We have API application, which uses many customers. Every customer have API token, which he passed in GET request. Example from access log: We want to create whitelist for tokens and limit the number of connections per second for each of the tokens using nginx. Can you advise something on the implementation o…

Nginx returns 404 not found when access file on server

I have a server(Ubuntu 16.04) and a user called coxier. I configure Nginx to Proxy Requests. I create a file etc/nginx/sites-available/myproject. In this flask project, server receive request and then generate a .gif file for this request. At first I directly I use flask#send_file to send gif file about 1MB, …

Detect if presence of a character in a string with Lua

I can have two types of string: nxs_flo_dev.nexus orfpdesk. I want to test if there is a . in the string. If there is a . I divide the string otherwise I do not do anything. Is there a function to do that? Because .contains() doesn’t work. Answer Use match again. Remember to escape the dot with %.: If y…

Setting up nginx with multiple IPs

I have my nginx configuration file under /etc/nginx/sites-available/ with two upstreams say Sending a curl request to <PrimaryIP>:80 works but I want to use <SecondaryIP1>:80 for test1 and <SecondaryIP2>:80 for test2. Is it possible to define this in nginx? Answer You have to have two server…