worpdress container is running
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#
|
||||
# # nginx conf
|
||||
# COPY ./conf/nginx_debian.conf /etc/nginx/nginx.conf
|
||||
# COPY ./conf/inception_nginx.conf /etc/nginx/conf.d/
|
||||
|
||||
# alpine (~ 45s) ---------------------------------------------
|
||||
|
||||
@@ -25,11 +26,11 @@
|
||||
|
||||
# nginx conf
|
||||
COPY ./conf/nginx_alpine.conf /etc/nginx/nginx.conf
|
||||
COPY ./conf/inception_nginx.conf /etc/nginx/http.d/
|
||||
|
||||
# common -----------------------------------------------------
|
||||
|
||||
# inception conf & personalized index.html
|
||||
COPY ./conf/inception_nginx.conf /etc/nginx/conf.d/
|
||||
# personalized index.html
|
||||
COPY ./conf/index.html /data/www/
|
||||
|
||||
# create ssl certificate
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# doc : https://nginx.org/en/docs/dirindex.html
|
||||
|
||||
# WIP redirect http to https
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl; # for ipv4, on port 443, specifying that accepted connections should works in ssl mode
|
||||
listen [::]:443 ssl; # for ipv6
|
||||
@@ -7,23 +15,23 @@ server {
|
||||
ssl_certificate /etc/ssl/certs/hulamy.42.fr.crt; # specifies the file with the ssl certificate (self signed here) generated by openssl
|
||||
ssl_certificate_key /etc/ssl/private/hulamy.42.fr.key; # specifies the file with the secret key of the certificate
|
||||
|
||||
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)
|
||||
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)
|
||||
|
||||
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
|
||||
root /data/www/;
|
||||
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
|
||||
root /data/www/;
|
||||
}
|
||||
|
||||
# pass PHP scripts to FastCGI (PHP-FPM) server
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
include /etc/nginx/fastcgi.conf;
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
include /etc/nginx/fastcgi.conf;
|
||||
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
# fastcgi_pass wordpress:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
#fastcgi_pass wordpress:9000;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user