I am running a web client for a mapping service and the app resides in a folder called prod. I have copied prod
to var/www/html/
.
This is my sites-enabled conf
for a Laravel app I have running already. I have added a location block for the prod folder at the end of the file. However when I go to 121.123.124.124/prod
it redirects to 121.123.124.124/login.
How can I stop the redirect and make the server serve the mapping service prod
folder instead?
server {
listen 80;
server_name 121.123.124.124;
root /var/www/html/laravel-app/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.(?!well-known).* {
deny all;
}
location ^~ /qgisserver {
gzip off;
include fastcgi_params;
fastcgi_pass unix:/var/run/qgisserver.socket;
}
location ^~ /prod {
root /var/www/html/prod
index index.html
}
}