Advertisement
Guest User

Untitled

a guest
Dec 15th, 2022
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. user nginx;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4.  
  5. include /usr/share/nginx/modules/*.conf;
  6.  
  7. events {
  8. worker_connections 1024;
  9. }
  10.  
  11. http {
  12. access_log /var/log/nginx/access.log;
  13. error_log /var/log/nginx/error.log;
  14.  
  15. sendfile on;
  16. tcp_nopush on;
  17. tcp_nodelay on;
  18. keepalive_timeout 65;
  19. types_hash_max_size 2048;
  20.  
  21. include /etc/nginx/mime.types;
  22. default_type application/octet-stream;
  23.  
  24.  
  25. upstream php-fpm {
  26. server unix:/run/php-fpm/www.sock;
  27. }
  28.  
  29. server {
  30. server_name adresstrony.pl;
  31. listen 443 ssl;
  32.  
  33. ssl_certificate /etc/letsencrypt/live/adresstrony.pl/fullchain.pem; # managed by Certbot
  34. ssl_certificate_key /etc/letsencrypt/live/adresstrony.pl/privkey.pem; # managed by Certbot
  35. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  36. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  37.  
  38. root /usr/share/nginx/html;
  39.  
  40. location / {
  41. try_files $uri $uri/index.html $uri/index.htm @php_redir;
  42. }
  43.  
  44. location ~ \.php$ {
  45. fastcgi_intercept_errors on;
  46. fastcgi_index index.php;
  47. include fastcgi_params;
  48. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  49. fastcgi_pass php-fpm;
  50. }
  51.  
  52. location @php_redir {
  53. rewrite ^/(.*) /index.php?_page_url=$1 last;
  54. }
  55. }
  56.  
  57. server {
  58. server_name adresstrony.pl;
  59. listen 80;
  60.  
  61. access_log off;
  62. error_log off;
  63.  
  64. return 301 https://$host$request_uri;
  65. }
  66. }
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement