Initial commit
This commit is contained in:
44
app/resources/nginx-main.conf
Normal file
44
app/resources/nginx-main.conf
Normal file
@ -0,0 +1,44 @@
|
||||
server {
|
||||
listen 8080 default_server;
|
||||
listen [::]:8080 default_server;
|
||||
listen 8081 ssl default_server;
|
||||
listen [::]:8081 ssl default_server;
|
||||
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
include snippets/common.conf;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
location ~* \.(?:js|css|png|jpg|gif|ico)$ {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
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 / {
|
||||
if (!-e $request_filename){
|
||||
rewrite ^/images/(.*)$ /index.php?error=image404&url=$1 break;
|
||||
rewrite ^/uploads/(.*)$ /index.php?error=upload404&url=$1 break;
|
||||
}
|
||||
rewrite ^/errors/(.*)$ /index.php?error=$1 break;
|
||||
rewrite ^/(.+)$ /index.php?url=$1&$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
|
||||
include snippets/fastcgi-php.conf;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user