Advertisement
sidneystreith1985

wordpress.conf

Apr 13th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. server {
  2. listen 80;
  3. root /var/www/html/wordpress/public_html;
  4. index index.php index.html;
  5. server_name _;
  6.  
  7. access_log /var/log/nginx/SUBDOMAIN.access.log;
  8. error_log /var/log/nginx/SUBDOMAIN.error.log;
  9.  
  10. location / {
  11. try_files $uri $uri/ =404;
  12. }
  13.  
  14. location ~ \.php$ {
  15. include snippets/fastcgi-php.conf;
  16. fastcgi_pass unix:/run/php/php8.2-fpm.sock;
  17. }
  18.  
  19. location ~ /\.ht {
  20. deny all;
  21. }
  22.  
  23. location = /favicon.ico {
  24. log_not_found off;
  25. access_log off;
  26. }
  27.  
  28. location = /robots.txt {
  29. allow all;
  30. log_not_found off;
  31. access_log off;
  32. }
  33.  
  34. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  35. expires max;
  36. log_not_found off;
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement