52 lines
1.4 KiB
Nginx Configuration File
52 lines
1.4 KiB
Nginx Configuration File
# /etc/nginx/nginx.conf
|
|
# disable daemonization
|
|
daemon off;
|
|
# basically the default config. stolen from the container before overriting
|
|
error_log stderr info;
|
|
pcre_jit on;
|
|
# user wordpress;
|
|
worker_processes auto;
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
server_tokens off;
|
|
client_max_body_size 1m;
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:2m;
|
|
ssl_session_timeout 1h;
|
|
ssl_session_tickets off;
|
|
gzip_vary on;
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
access_log stderr;
|
|
# end of default server
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name rparodi.42.fr;
|
|
|
|
ssl_certificate /etc/nginx/ssl/nginx.crt;
|
|
ssl_certificate_key /etc/nginx/ssl/nginx.key;
|
|
ssl_protocols TLSv1.3;
|
|
index index.php;
|
|
root /var/www/html;
|
|
location ~ [^/]\.php(/|$) {
|
|
try_files $uri =404;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_pass wordpress:9000;
|
|
}
|
|
}
|
|
}
|