12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- server {
- listen 80;
- listen [::]:80;
- server_name localhost;
-
- return 301 https://$host$request_uri;
- }
- server {
-
-
- listen 443 ssl;
- listen [::]:443;
- ssl_certificate /etc/nginx/ssl/localhost.crt;
- ssl_certificate_key /etc/nginx/ssl/localhost.key;
-
-
-
- gzip off;
-
-
-
- root /var/www/moodle;
-
- index index.php index.html index.htm;
- server_name localhost;
- access_log /var/log/nginx/moodle-access.log;
- error_log /var/log/nginx/moodle-error.log;
-
-
- include snippets/hsts.conf;
-
-
- include snippets/allowed.conf;
- include snippets/denied.conf;
- location / {
-
-
- try_files $uri $uri/ =404;
- }
-
-
- location ~ [^/]\.php(/|$) {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_index index.php;
- fastcgi_pass unix:/run/php/php7.2-fpm.sock;
- include fastcgi_params;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- }
|