map is showing and files are enqueued and included the right way
This commit is contained in:
@@ -11,6 +11,8 @@ RUN apk update && apk add \
|
||||
# nginx conf
|
||||
COPY ./conf/nginx.conf.alpine /etc/nginx/nginx.conf
|
||||
COPY ./conf/inception_nginx.conf /etc/nginx/http.d/
|
||||
# dir for logs
|
||||
RUN mkdir -p /var/log/nginx/
|
||||
|
||||
# create user www-data and assign it to group www-data
|
||||
RUN adduser -S www-data && \
|
||||
|
||||
@@ -9,18 +9,40 @@ server {
|
||||
|
||||
root /var/www/html/; # contains default nginx index.nginx-debian.html
|
||||
index index.html index.php; # defines files that will be used as index (https://nginx.org/en/docs/http/ngx_http_index_module.html)
|
||||
|
||||
access_log /var/log/nginx/${WP_URL}.access.log;
|
||||
error_log /var/log/nginx/${WP_URL}.error.log;
|
||||
|
||||
location / {
|
||||
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
|
||||
# use fastcgi for all php files
|
||||
location ~ \.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;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
# followings are from :
|
||||
# https://www.farinspace.com/wordpress-nginx-rewrite-rules/
|
||||
|
||||
# unless the request is for a valid file, send to bootstrap
|
||||
# without this, permalinks changes don't work
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.+)$ /index.php?q=$1 last;
|
||||
}
|
||||
|
||||
## enforce NO www
|
||||
#if ($host ~* ^www\.(.*)) {
|
||||
# set $host_without_www $1;
|
||||
# rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
|
||||
#}
|
||||
|
||||
## catch all
|
||||
#error_page 404 /index.php;
|
||||
|
||||
## deny access to apache .htaccess files
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user