Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nginx]

Nginx (pronounced "engine x") is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache. Created by Igor Sysoev in 2002, Nginx runs on Unix, Linux, BSD variants, Mac OS X, Solaris, AIX, HP-UX, and Microsoft Windows.

1
vote
1answer
16 views

Nginx config with some conditionals

This config has 3 main features but there seems to be a lot of duplication and I wonder if I could improve it. 1 Detect all pngs and jpgs in static/img and try a webp version if the requesting ...
1
vote
1answer
39 views

Nginx-WordPress conf

This is how I create am Nginx virtual host for a WordPress webapp. I did best to keep it as minimal as I can while having a working webapp. Please review it: ...
2
votes
2answers
91 views

Nginx-WordPress installer for Debian

I have written the following Bash script which includes an Nginx WordPress bootstrapper: A program establish WordPress apps fast on a Debian-Nginx environment. It utilizes CertBot for HTTPS, SSHguard ...
3
votes
1answer
75 views

Create a WordPress site data with Nginx app data automatically

The following script is aimed for Ubuntu >=16.04 LEMP environments with PHP-FPM >=7.0, MySQL, WP-CLI, Certbot, and ...
1
vote
1answer
54 views

Ubuntu-Nginx lightweight server environment setup

Please review the following Bash script that uses to establish a "lightweight" Ubuntu-Nginx server environment mainly aimed to run small WordPress sites (about 5 plugins, about 25 webpages, about 25 ...
3
votes
1answer
104 views

Webapp Substrate script for WordPress on Debian-Nginx

The following script creates a webapp substrate for WordPress webapps/websites on Ubunu-Nginx with PHP-FPM and Mysql environments, with Certbot, while all software is uncustomized. Such substrate ...
2
votes
1answer
91 views

Nix cron daily and weekly scripts for a minimal Nginx server environment

I've created the following Nix cron for daily and weekly scripts for a minimal Nginx server environment (as part of my larger script). The daily cronjob updates WordPress and brings back original ...
2
votes
0answers
48 views

Nginx configuration, with global defaults and support for a PHP site

The following code is an Nginx default conf file. The conf file itself includes another server block which holds a site's conf. While this combination works and ...
3
votes
1answer
1k views

nginx serve static - images, js, css and proxy node.js server

I'm building a server for serving static content, and uploading images there. Everything works, but I'm not expert in nginx and server configuration, so maybe someone sees some improvements for this. ...
2
votes
1answer
46 views

C program to “monitor” NGINX status with AF_INET

I'm trying to implement a simple "monitoring" tool in C to be used on our servers to check NGINX status, executed periodically with a cron task. This is my very ...
2
votes
1answer
103 views

Basic Nginx server environment creation script

Here's a script I wrote for raising up a basic Nginx server environment. The script includes an internal script named csb (create Sblock) which is used to create Sblocks in a comfortable way. As I'm ...
2
votes
3answers
156 views

PHP form that posts to Trello API and mailgun API

The following is the full code of a page that receives a POST request from another page (I don't believe it's too relevant what that other page is, but I'll post it if requested). Assuming that a ...
2
votes
2answers
63 views

Small PHP CMS base

I am a bit worried about this small PHP base as it has been running a bit slow. Can anyone notice anything majorly wrong with it? root/Index.php: ...
5
votes
1answer
1k views

Asynchronous request cloning using Lua + openresty

I'm working on a project to clone a subset of requests going to our production servers to one or more non-production endpoints. I opted to do this in Nginx and Lua because at the time, I could not ...
2
votes
0answers
73 views

Nginx rewrite optimization for PHP execution

I've posted an excerpt from my Nginx configuration with the hope that someone can give me advice on anything I've done wrong or could do better. Please note that the below config works, but has been ...
1
vote
0answers
647 views

Nginx SSL proxy to squarespace.com site

I'm using SSL proxying to my squarespace.com site since they don't allow SSL. I was previously setting the HSTS header so I have some browsers that won't go to an HTTP version of my page. I need to ...
4
votes
1answer
3k views

Nginx Alias vs Rewrite

I have two working configurations that, on the surface, seem to do the same thing. They both accomplish the functionality that I need: ...
4
votes
1answer
63 views

Setting .conf files for Nginx

I use Nginx as a server, and I currently use this for configuration of each my sites. Basically, I have multiple files like this located in /etc/nginx/conf.d/. <...
2
votes
1answer
845 views

Staging/release nginx config

I don't like how this config has so much duplication. Any suggestions on how to at least shorten it somewhat? Normally we only have one server block as the staging server is separate from production, ...
2
votes
1answer
86 views

Unduplicating prox_pass in nginx location blocks

I needed to IP block something in nginx and I ended up with duplicated proxy_forward code. How can I refactor and un-duplicate this? ...