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.
Tag: nginx
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
Failed to archieve Gitolite (Git) and nginx webserver access webspace at the same time
Starting point: Ubuntu 20.04 Gitolite (/home/git/) Webspace /var/www/webspace (usually owned by www-data:www-data) Git user (in www-data group and also tried without beeing in group) I want to update the webspace as git user with post-receive to a www-data directory. I had it archived before I installed Gitolite, but it doesn’t seem to work the same way as it did before
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
PHP kill exec() background process after php-fpm restarted
I use nginx and php7.1-fpm. I want to run a background process using PHP and exec(). My short code: Unfortunately after the systemd restart php7.1-fpm the program is killed. I have tried to run with a different user than the one running the pool: However, this does not solve the problem – still kills. I can not use ssh2_connect(). How
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:
Starting container as a non-root user vs starting as root and then downgrade to non-root
I am creating some Docker images and I am reading how others have been doing this. I have identified three general patterns when it comes to the user that runs processes inside the container: It uses root user for everything (spawned process(es) inside container run under root). It uses root user, does some stuff, then downgrades to non-root user (so