x

Mga pangunahing kabanata

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. Gabay sa mabilis na pagsisimula - LimeSurvey 3.0+
  3. Pag-install - LimeSurvey CE
  4. Paano magdisenyo ng magandang survey (gabay)
  5. Pagsisimula
  6. Pangangasiwa sa LimeSurvey
  7. Mga Survey - panimula
  8. Mga setting ng survey
  9. Menu ng survey
  10. Istraktura ng survey
  11. Mga tanong - panimula
  12. Mga pangkat ng tanong - panimula
  13. Mga survey - pamamahala
  14. Mga opsyon ng toolbar ng survey
  15. Multilingual na survey
  16. ExpressionScript Engine - Gabay sa mabilis na pagsisimula
  17. Mga hindi nakategoryang tampok at advanced na tampok
  18. Pangkalahatang FAQ
  19. Pag-troubleshoot
  20. Mga Workaround
  21. Lisensya
  22. Log ng pagbabago ng bersyon
  23. Plugins
 Actions

Halimbawang configuration ng nginx para sa LimeSurvey

From LimeSurvey Manual

Maaaring isinalin ng makina ang pahinang ito at maaaring may mga mali. Ipakita ang orihinal sa Ingles · Pagbutihin ang salin na ito
This page is a translated version of the page LimeSurvey nginx example configuration and the translation is 100% complete.

Halimbawa ng configuration ng Nginx para sa LimeSurvey

Narito ang isang halimbawang configuration para sa pagpapatakbo ng LimeSurvey gamit ang nginx at PHP-FPM. Baguhin ang mga path, domain name, at mga setting ng PHP-FPM socket/port upang tumugma sa setup ng iyong server.

Tandaan: Isa itong pangunahing halimbawa. Palaging suriin at iangkop ito sa sarili mong mga kinakailangan sa seguridad bago gamitin sa production.

server {
    listen 80;
    server_name survey.example.com;
    # Redirect all HTTP traffic to HTTPS
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name survey.example.com;

root /var/www/limesurvey;
    index index.php;

# SSL certificates
    ssl_certificate     /etc/ssl/certs/survey.example.com.crt;
    ssl_certificate_key /etc/ssl/private/survey.example.com.key;

# Recommended SSL settings
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;

client_max_body_size 100M;

access_log /var/log/nginx/limesurvey_access.log;
    error_log  /var/log/nginx/limesurvey_error.log;

location / {
        index  index.html index.php;
        try_files $uri $uri/ /index.php?$args;
    }

location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

# Deny access to hidden files and sensitive directories
    location ~ /\.(?!well-known).* {
        deny all;
    }

location ~ ^/tmp/runtime/ {
        deny  all;
    }
location ~* /(application|protected|modules|locale|framework|vendor|tests|docs|db|application/config)/ {
        deny all;
    }

# 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;
    }

#Disallow direct read user upload files
location ~ ^/upload/surveys/.*/fu_[a-z0-9]*$ {
        return 444;
    }

location ~* \.(log|sql|htaccess)$ {
        deny all;
    }

# Allow LimeSurvey to serve uploaded files and assets
    location /upload/ {
        try_files $uri $uri/ =404;
    }
}

Paliwanag sa mahahalagang directive

  • fastcgi_pass: Tumutukoy sa PHP-FPM socket o TCP address na humahawak sa mga PHP request. Baguhin ito upang tumugma sa configuration ng iyong PHP-FPM pool.
  • try_files: Tinitiyak na tama ang pag-route ng mga URL sa front controller ng LimeSurvey (index.php).
  • client_max_body_size: Pinapataas ang maximum na laki ng mag-upload, kapaki-pakinabang para sa mga survey na may mga tanong na file-upload.
  • Mga deny rule: Hinaharang ang direktang web access sa mga configuration file, log, at application directory na hindi dapat maabot ng publiko.