'nginx not showing any subdirectories
I have a nginx configuration for one of my sites. Its showing the files in the /var/www/html/tommiejones subfolder but its not showing the subdirectories. I have multiple files in the top level directory and its showing those fine.
server {
listen 80;
listen [::]:80;
# Add index.php to the list if you are using PHP
index index.html index.htm;
server_name www.tommiejones.com tommiejones.com;
root /var/www/html/tommiejones;
location ~/api/(.*)$ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8000/api/$1;
}
location / {
root /var/www/html/tommiejones;
try_files $uri $uri/ =404;
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
