nikolailarsen01

Nginx config

Jun 28th, 2021
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. server {
  2. listen 443 ssl;
  3. server_name grocy.mydomain.net;
  4. root /var/www/grocy/public;
  5. index index.php index.html;
  6.  
  7. location / {
  8. try_files $uri $uri/ /index.php?$query_string;
  9. gzip_static on;
  10. }
  11.  
  12.  
  13. location ~ .php$ {
  14. try_files $uri =404;
  15. fastcgi_split_path_info ^(.+.php)(/.+)$;
  16. fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  17. fastcgi_index index.php;
  18. include fastcgi_params;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20. fastcgi_param PATH_INFO $fastcgi_path_info;
  21. }
  22.  
  23. ssl_certificate /etc/letsencrypt/live/grocy.mydomain.net/fullchain.pem; # managed by Certbot
  24. ssl_certificate_key /etc/letsencrypt/live/grocy.mydomain.net/privkey.pem; # managed by Certbot
  25. }
Advertisement
Add Comment
Please, Sign In to add comment