solved 404 not found on get style and script
This commit is contained in:
@@ -19,22 +19,16 @@ server {
|
||||
index index.html index.php; # defines files that will be used as index (https://nginx.org/en/docs/http/ngx_http_index_module.html)
|
||||
|
||||
location / {
|
||||
autoindex on;
|
||||
try_files $uri $uri/ =404; # from /etc/nginx/sites-enabled/default : First attempt to serve request as file, then as directory, then fall back to displaying a 404
|
||||
}
|
||||
|
||||
# pass PHP scripts to FastCGI (PHP-FPM) server
|
||||
location ~ \.php$ {
|
||||
|
||||
autoindex on;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass wordpress:9000;
|
||||
# https://joshtronic.com/2019/07/29/symlinks-with-nginx-and-php-fpm/
|
||||
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
try_files $uri =404;
|
||||
|
||||
include fastcgi_params;
|
||||
fastcgi_pass wordpress:9000;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user