mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
86 lines
2.0 KiB
Nginx Configuration File
86 lines
2.0 KiB
Nginx Configuration File
|
|
server {
|
|
|
|
listen 80 ;
|
|
listen [::]:80;
|
|
server_name 0.0.0.0;
|
|
|
|
#include /etc/nginx/common/protect.conf;
|
|
#include /etc/nginx/common/protect_add_header.conf;
|
|
#include /etc/nginx/common/ssl.conf;
|
|
|
|
|
|
root /usr/share/nginx/html/webroot;
|
|
index index.php;
|
|
|
|
location ~* \.(png|jpg|ico|webp)\$ {
|
|
expires 30d;
|
|
}
|
|
|
|
location ~* \.(js|css) {
|
|
# expires 1d;
|
|
expires 1d;
|
|
}
|
|
|
|
location ~ \.php\$ {
|
|
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
# Check that the PHP script exists before passing it
|
|
try_files $fastcgi_script_name =404;
|
|
|
|
# Bypass the fact that try_files resets $fastcgi_path_info
|
|
# see: http://trac.nginx.org/nginx/ticket/321
|
|
set $path_info $fastcgi_path_info;
|
|
fastcgi_param PATH_INFO $path_info;
|
|
|
|
fastcgi_index index.php;
|
|
include fastcgi.conf;
|
|
|
|
#fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
location /account {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade \$http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_cache_bypass \$http_upgrade;
|
|
proxy_set_header X-Real-IP \$remote_addr;
|
|
proxy_set_header X-Forwarded-For \$remote_addr;
|
|
proxy_set_header Host \$host;
|
|
rewrite /account/(.*) /\$1 break;
|
|
|
|
#proxy_next_upstream error timeout invalid_header http_502 non_idempotent;
|
|
proxy_pass http://login-server:1200;
|
|
proxy_redirect off;
|
|
|
|
|
|
}
|
|
|
|
location /login_api {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade \$http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_cache_bypass \$http_upgrade;
|
|
proxy_set_header X-Real-IP \$remote_addr;
|
|
proxy_set_header X-Forwarded-For \$remote_addr;
|
|
proxy_set_header Host \$host;
|
|
rewrite /login_api/(.*) /\$1 break;
|
|
|
|
proxy_pass http://login-server:1201;
|
|
proxy_redirect off;
|
|
}
|
|
|
|
location / {
|
|
try_files \$uri \$uri/ /index.php?\$args;
|
|
}
|
|
|
|
# access_log /var/log/nginx/access.log main;
|
|
|
|
} |