Commit c0abe4ec authored by schmunk42's avatar schmunk42

aligned nginx configuration for Debian and Alpine

parent 75db3576
Pipeline #29017 failed with stages
in 10 minutes and 7 seconds
server {
charset utf-8;
client_max_body_size 512M;
server_name app;
listen 80;
listen 443 ssl http2 default_server;
ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;
root /app/web;
index index.php;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;
}
# define suffixes for static files
# set caching header and avoid processing of non-existing files by Yii
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar|svg|woff|woff2|eot|ttf|otf)$ {
# set expire Header
expires 6M;
#add_header Cache-Control "public";
add_header Last-Modified "";
# keep logs clean
log_not_found off;
try_files $uri =404;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
\ No newline at end of file
......@@ -63,51 +63,5 @@ http {
# don't use etag with expire
etag off;
server {
charset utf-8;
client_max_body_size 512M;
server_name app;
listen 80;
listen 443 ssl http2 default_server;
ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;
root /app/web;
index index.php;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;
}
# define suffixes for static files
# set caching header and avoid processing of non-existing files by Yii
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar|svg|woff|woff2|eot|ttf|otf)$ {
# set expire Header
expires 6M;
#add_header Cache-Control "public";
add_header Last-Modified "";
# keep logs clean
log_not_found off;
try_files $uri =404;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
include /etc/nginx/conf.d/*.conf;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment