skip to Main Content

Using multiple nginx config files in sites-available with proxy pass

I am wanting to use multiple files declared at /etc/nging/sites-available/ symlinked to: /etc/nginx/sites-enabled/ Now the files look similar to below - call this team1.conf: server { listen 80; location /team1/app3/location/region { rewrite ^/team1/app3/location/region(.*) /path3/healthcheck$1 break; proxy_pass https://this.is.the.backend.app.example; } location /team1/app4/location/region…

VIEW QUESTION

geoip_country_name returns "-" in nginx

I am trying to install geoip module for nginx though dockerfile by adding to my dockerfile the following: RUN apk add --no-cache libmaxminddb nginx-mod-http-geoip RUN cd /var/lib; mkdir -p nginx; wget -q -O- https://dl.miyuru.lk/geoip/maxmind/country/maxmind.dat.gz | gunzip -c > nginx/maxmind-country.dat; wget…

VIEW QUESTION

NGINX Two Directories One URL (Codeigniter, HTML)

Here is my default.conf file: server { listen 80; listen [::]:80; root /var/www/html/; server_name example.com; # Site 01 location /* { alias /var/www/html/home/; index index.htm index.php; try_files $uri $uri/ /home/index.html; } # Site 2 location /shadows { alias /var/www/html/shadows/; index…

VIEW QUESTION

Nginx Match Image Filename Based On Part of URL?

For local development, I'm trying to serve static content out of a public directory. My images live in app/public/images, and my root is app/public. My images are looked up at /d/my_app_name/images/<image>.png. I'm matching the /d/my_app_name/images location, but trying to figure…

VIEW QUESTION

Nginx locations

I'm working on a multi-tenant application in React and some clients want to upload .html files to the root of the project to use google console and things like that. I would not like all those files to be mixed…

VIEW QUESTION

Configure nginx vhosts by path

I want to serve my projects by first item in the path, for example http://example.com/projectname should serve a project in /usr/share/nginx/html/projectname. This is what my configurations look like: server { listen 80; server_name example.com www.example.com; rewrite ^/(.*) https://example.com/$1 permanent; }…

VIEW QUESTION
Back To Top
Search