- Posts: 1
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
php -v PHP 8.1.0 (cli) (built: Nov 25 2021 20:22:03) (NTS) Zend Engine v4.1.0, Copyright (c) Zend Technologies with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies
lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04
nginx -v nginx version: nginx/1.18.0 (Ubuntu)
sudo nano /var/www/html/limesurvey/application/config/config.php 'urlManager' => array( 'urlFormat' => 'path', 'rules' => array( // You can add your own rules here ), 'showScriptName' => false, )
Server{ set $host_path /var/www/html/limesurvey; server_name my-Domain.eu; # managed by Certbot root /var/www/html/limesurvey; charset utf-8; client_max_body_size 100M; index index.php; try_files $uri /index.php?r=$uri&$args; #Disallow reading inside php script directory, see issue with debug > 1 on note location ~ ^/(application|docs|framework|locale|protected|tests|themes/\w+/views) { deny all; } # Allow access to well-known directory, different usage, for example ACME Challenge for Let's Encrypt location ~ /\.well-known { allow all; } # Deny all attempts to access hidden files # such as .htaccess, .htpasswd, .DS_Store (Mac). location ~ /\. { deny all; } #Disallow direct read user upload files location ~ ^/upload/surveys/.*/fu_[a-z0-9]*$ { return 444; } #Disallow uploaded potential executable files in upload directory location ~* /upload/.*\.(pl|cgi|py|pyc|pyo|phtml|sh|lua|php|php3|php4|php5|php6|pcgi|pcgi3|pcgi4|pcgi5|pcgi6|icn)$ { return 444; } #avoid processing of calls to unexisting static files by yii location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { try_files $uri =404; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(.*)$; try_files $uri index.php; fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; } listen [::]:443 ssl ipv6only=on; # managed by Certbot listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/my-Domain.eu/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/my-Domain.eu/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot }