Files
thetempusproject/docker/nginx.conf
2024-08-09 00:30:45 -04:00

73 lines
1.8 KiB
Nginx Configuration File

server {
listen 80 default_server;
index index.php;
server_name TheTempusProject;
error_log /var/www/html/logs/nginx-error.log;
access_log /var/www/html/logs/nginx-access.log;
root /var/www/html;
charset utf-8;
sendfile off;
client_max_body_size 100m;
location /js/ {
access_log off;
log_not_found off;
try_files $uri /index.php?error=js404&file=$uri;
}
location /css/ {
access_log off;
log_not_found off;
try_files $uri /index.php?error=css404&file=$uri;
}
location /images/ {
try_files $uri /index.php?error=image404&url=$uri;
}
location /uploads/ {
try_files $uri /index.php?error=upload404&url=$uri;
}
location /errors/ {
try_files $uri /index.php?error=$uri;
}
location ~* \.(?:js|css|png|jpg|gif|ico)$ {
access_log off;
log_not_found off;
}
location = /favicon.ico {
access_log off;
log_not_found off;
rewrite ^(.+)$ /images/favicon.ico break;
}
location = /robots.txt {
allow all;
access_log off;
log_not_found off;
rewrite ^(.+)$ /bin/robots.txt break;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 60s;
fastcgi_read_timeout 60s;
fastcgi_send_timeout 60s;
}
location / {
rewrite ^/(.+)$ /index.php?url=$1&$args last;
}
}