Skip to content
Advertisement

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 and all is working well EXCEPT, this system has a file upload/view/delete component to it.

Ubuntu Modoboa from NGINX to APACHE2: HttpS 403 forbidden while HTTP is correctly accessible. (mod_WSGI)

Resources: LINUX UBUNTU 20.04 Apache/2.4.41 (Ubuntu) Server Port 443 Certbot verified HTTPS. Latest version of Modoboa installed by the tutorial of mod_wsgi (sudo apt-get install libapache2-mod-wsgi-py3) in HTTP the sites loads of Modoboa and is accessible (so this means python3 installation all good everything working fine in Apache2). Problem: in HTTPS it returns: 403 Forbidden You don’t have permission to

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 of this task? Answer The limit_req directive controls

NGINX rate limiting doesn’t work when using Cloudflare. I can bring down my site with a simple `ab` command

I implemented a pretty simple but super effective rate limiting based on this blog post: https://www.nginx.com/blog/rate-limiting-nginx/ Basically: It works great. However, recently I tried Cloudflare, and this doesn’t protect me anymore. I can bring down the site myself with a simple command of: What’s happening? Answer ab -k -c 1000 -n 10000 site.com/ is running 1000 requests in parallel, until

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, however speed is very slow. So I decide to optimize

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 you

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 directives to accomplish this task:

Advertisement