Nginx file upload error

When uploading a file on a PHP Application running under an Nginx web server, I get the following error 2021/08/14 12:32:04 [crit] 1722576#1722576: *42823 open() “/var/lib/nginx/tmp/client_body/0000000006” failed (13: Permission denied), client: 59.12.21.51, server: team.serverok.in, request: “POST /index.php/ijci/$$$call$$$/wizard/file-upload/file-upload-wizard/upload-file?submissionId=311&stageId=1&fileStage=2&reviewRoundId=&assocType=&assocId= HTTP/2.0”, host: “team.serverok.in”, referrer: “https://team.serverok.in/index.php/ijci/submission/wizard/2?submissionId=311” The error was due to wrong ownership for folder /var/lib/nginx/tmp/client_body/ or one of … Read more

Enable SSL for icecast steam using nginx

On ubuntu server running icecast, when i try enable SSL as per CentovaCast Enable SSL on icecast, i get following error connection/get_ssl_certificate No SSL capability I don’t compile my own icecast installation as it use Ubunu version of icecast, that get updated using apt. Instead of getting icecast serve steam using SSL, i installed Nginx, … Read more

Nginx Hotlink Protection

To block hotlink protection or bandwidth stealing, you can add the following to the server configuration of your website. If you need to allow hotlinks from a specific domain, you can edit the valid_referers line and add the URL. For allowing access without any referral, you can use “none” instead of the domain name. For … Read more

Nginx Proxy Manager Certificate Key is not valid

When adding custom SSL on Nginx Proxy Manager, i get following error. Upload failed: Certificate Key is not valid (Command failed: openssl ec -in /tmp/15dbf072-4022-aee94-0f88e4fb8d86/tmp -check -noout 2>&1 ) I tried upgrading Nginx Proxy Manager to the latest version with the following commands Even after the upgrade, this error persists. I checked logs for the … Read more

EasyEngine Could not create user

When creating a wordpress web site on EasyEngine, i get following error root@ee:~# ee site create smartandsolar.serverok.in –wp Starting site creation. Warning: Could not create user smartandsolar.serverok.in-8LHl6l. Please check logs. Warning: Initiating clean-up. Success: Site smartandsolar.serverok.in deleted. Report bugs here: https://github.com/EasyEngine/site-type-wp root@ee:~# This is because EasyEngine try to create a WordPress admin user, that failed … Read more

How to block .git directory in nginx

When using git version control to deploy application, many forget to secure .git folder. This allows anyone to clone your git repository. If you have any credentials commited to your git version control, then hacker will be able to gain access. To avoid this, it is better plan the git repo in a way you … Read more

Enable Nginx Status Page

Nginx status is provided by http_stub_status module. To verify if your Nginx is installed with this module, run nginx -V 2>&1 | grep -o with-http_stub_status_module If the result shows “with-http_stub_status_module”, you have the module installed. To enbale stats edit nginx configuration file for your web site, add following code location /nginx_status {     stub_status; … Read more

Nginx upstream sent too big header

Plesk Nginx

When I log in to a PrestaShop website, I get an error on a Plesk server. 502 Bad Gateway On checking error login for the site in folder /var/www/vhosts/domain.com/logs/proxy_error_log, I found the following error message proxy_error_log:2020/11/25 19:41:41 [error] 1809#0: *39664 upstream sent too big header while reading response header from upstream, client: 59.92.71.53, server: tulivesi.com, … Read more

Country Blocking with nginx GeoIP on Ubuntu/Debian

On Ubuntu/Debian, install nginx geoip module with apt install geoip-database libgeoip1 libnginx-mod-http-geoip -y Now edit nginx.conf vi /etc/nginx/nginx.conf Find http { Add below geoip_country /usr/share/GeoIP/GeoIP.dat; map $geoip_country_code $my_country_blocker { default no; US yes; AU yes; CA yes; } You can add 2 letter country code and set ye/no as required. To implement GeoIP blocking for … Read more

Install Nginx from source

Nginx Web Server

Install Requirements CentOS/RHEL/Fedora Ubuntu/Debian Create nginx user Downoad and insta Nginx You can download latest version of Nginx source code from https://nginx.org/en/download.html To install version 1.19.2, run Test Nginx To start nginx run Configuration file is at Enable rtmp stream to configure nginx-rtmp module, see https://github.com/arut/nginx-rtmp-module See Nginx

Install Nginx Proxy Manager

Nginx Proxy Manager

Nginx Proxy Manager is Docker based GUI for managing Nginx reverse proxy. It support LetsEncrypt free SSL. https://nginxproxymanager.com Nginx Proxy Manager Certificate Key is not valid Install Custom SSL on Nginx Proxy Manager To install, create a folder mkdir nginx-proxy-manager cd nginx-proxy-manager Creaye docker-compose.yaml file vi docker-compose.yaml add following content version: “3” services: app: image: … Read more