nginx.conf 570 B

123456789101112131415161718192021
  1. log_format custom '$remote_addr - [$time_iso8601] "$request" $status $body_bytes_sent $request_time "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
  2. server {
  3. listen 8080;
  4. server_name _;
  5. index index.html index.php;
  6. root /var/www/html;
  7. access_log /var/log/nginx/localhost.access.log custom;
  8. error_log /var/log/nginx/localhost.error.log warn;
  9. location / {
  10. try_files $uri $uri/ =404;
  11. }
  12. location ~ \.php$ {
  13. include snippets/fastcgi-php.conf;
  14. fastcgi_pass unix:/run/php/php8.1-fpm.sock;
  15. }
  16. }