Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Unable to set basic configuration

$
0
0
Hi,

I'm trying to modify an existing configuration on my synonogy nas.

I followed the Beginner's guide but something is wrong.

Please find my main server config (I can't edit this):

server {

listen 80;
listen [::]:80;

listen 443 ssl;
listen [::]:443 ssl;

server_name www.virginia.ovh;

ssl_certificate /usr/local/etc/certificate/WebStation/vhost_e612e1d5-c9b9-468e-badd-e2504d85601e/fullchain.pem;
ssl_certificate_key /usr/local/etc/certificate/WebStation/vhost_e612e1d5-c9b9-468e-badd-e2504d85601e/privkey.pem;
include /usr/syno/etc/security-profile/tls-profile/config/vhost_e612e1d5-c9b9-468e-badd-e2504d85601e.conf*;

ssl_prefer_server_ciphers on;

location ^~ /.well-known/acme-challenge {
root /var/lib/letsencrypt;
default_type text/plain;
}

root "/volume1/TELERELEVE/dev";
index index.html index.htm index.cgi index.php index.php5 ;
error_page 400 401 402 403 404 405 406 407 408 500 501 502 503 504 505 @error_page;

location @error_page {
root /var/packages/WebStation/target/error_page;
rewrite ^ /$status.html break;
}

location ^~ /_webstation_/ {
alias /var/packages/WebStation/target/error_page/;
}

location ~* \.(php[345]?|phtml)$ {
fastcgi_pass unix:/run/php-fpm/php-c955c07d-aa67-4013-bcda-4189fb9a1f34.sock;
fastcgi_param HOST "www.domain.tld";
include fastcgi.conf;
}

include /usr/local/etc/nginx/conf.d/e612e1d5-c9b9-468e-badd-e2504d85601e/user.conf*;

}

To add config I edited this file:

/usr/local/etc/nginx/conf.d/e612e1d5-c9b9-468e-badd-e2504d85601e/user.conf

I only add this to try to undestand nginx config:

location / {
root /volume1/TELERELEVE/dev;
}

location /webapp/ {
root /images;
}

This link is working: https://www.domain.tld/images/gear.gif

Whith my config, I expected this to work also: https://www.domain.tld/webapp/images/gear.gif

I suppose the instructions between "root" and "index" takes over the last file, I dont know how to ovreride this.

Thank you for help.

Regads,

Eliott.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>