server { listen 80 default_server; listen [::]:80 default_server; client_max_body_size 100M; proxy_read_timeout 600; listen 443 ssl default_server; listen [::]:443 ssl default_server; ssl_certificate /etc/ssl/certs/websco.cer; ssl_certificate_key /etc/ssl/private/websco.key; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name websco.contoso.com; location / { index index.php index.html index.htm; try_files $uri $uri/ =404; } location /websco/ { index index.php index.html index.htm; if (!-e $request_filename){ rewrite ^/websco/(.*)$ /websco/websco.php?path=$1 last; } } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.3-fpm.sock; } location ~ /\.ht { deny all; } }