configurations/Nginx/Server Blocks/libraryofcode.org.conf

36 lines
945 B
Plaintext
Raw Normal View History

2021-05-01 15:13:49 -04:00
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name www.libraryofcode.org;
2021-05-01 16:25:44 -04:00
2021-05-01 15:13:49 -04:00
ssl_certificate /etc/nginx/ssl/org.chain.crt;
ssl_certificate_key /etc/nginx/ssl/org.key.pem;
2021-05-01 16:25:44 -04:00
2021-05-01 15:13:49 -04:00
root /var/www/wordpress;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
2021-07-07 17:55:50 -04:00
location ~ \.php$ {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_intercept_errors on;
2021-07-07 17:56:38 -04:00
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
2021-07-07 17:55:50 -04:00
#The following parameter can be also included in fastcgi_params file
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
2021-05-01 15:13:49 -04:00
}