0% found this document useful (0 votes)
5 views1 page

Nginx Conf

This document is a configuration file for an Nginx server. It sets up the server to listen on port 80 for the domain laborell.bieda.it, serving static files and processing PHP requests via FastCGI. Specific rules are included for handling favicon, robots.txt, and caching for static assets like JavaScript and images.

Uploaded by

kongocode
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Nginx Conf

This document is a configuration file for an Nginx server. It sets up the server to listen on port 80 for the domain laborell.bieda.it, serving static files and processing PHP requests via FastCGI. Specific rules are included for handling favicon, robots.txt, and caching for static assets like JavaScript and images.

Uploaded by

kongocode
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

server {

listen 80;
listen [::]:80;

root /var/www/html/laborell.bieda.it;

index index.html index.htm index.php;

server_name laborell.bieda.it;

location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break
when using query string
try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;

#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini


include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
#The following parameter can be also included in fastcgi_params file
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}

You might also like