skip to Main Content

Nginx choosing wrong server

I want to handle to handle sub.domain.com and domain.com with different server blocks. So I created the following config: server { listen 443 ssl; server_name sub.domain.com; location / { ... } } server { listen 443 ssl; server_name domain.com; location…

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
Back To Top
Search