From fd7867ad5016f8e6e8852c6e5d5eeb1de154cc3d Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 5 Jan 2022 04:22:07 +0100 Subject: [PATCH] nginx gradido.conf --- .../nginx/sites-available/gradido.conf | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 deployment/bare_metal/nginx/sites-available/gradido.conf diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf b/deployment/bare_metal/nginx/sites-available/gradido.conf new file mode 100644 index 000000000..279ca9efb --- /dev/null +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf @@ -0,0 +1,134 @@ +server { + server_name _; + #server_name 0.0.0.0; + listen 80; + listen [::]:80; + + #include /etc/nginx/common/protect.conf; + #include /etc/nginx/common/protect_add_header.conf; + #include /etc/nginx/common/ssl.conf; + + #root /var/www/html/gradido/community_server/webroot; + #index index.php; + + #gzip_static on; + + # Frontend + location / { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:3000; + proxy_redirect off; + } + + # Backend + location /graphql { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:4000; + proxy_redirect off; + } + + # Admin Frontend + location /admin { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:8080; + proxy_redirect off; + } + + #location ~ \.php$ { + # fastcgi_pass community-server:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + # # fastcgi_param PHP_VALUE "error_log=/var/www/myapp/logs/php_errors.log"; + # fastcgi_buffers 16 16k; + # fastcgi_buffer_size 32k; + # include fastcgi_params; + #} + + + #location / { + # try_files $uri $uri/ /index.php?$args; + #} + + #location ~ \.php$ { + # include snippets/fastcgi-php.conf; + # fastcgi_pass unix:/run/php/php7.4-fpm.sock; + #} + + #location ~ /\.ht { + # deny all; + # } + + #location /vue { + # alias /var/www/html/gradido/frontend/dist; + # index index.html; + # + # location ~* \.(png)$ { + # expires 39d; + # } + # try_files $uri $uri/ /index.html = 404; + #} + + #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_pass http://127.0.0.1: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://127.0.0.1:1201; + # proxy_redirect off; + #} + + #location / { + # try_files $uri $uri/ /index.php?$args; + #} + + #location /sockjs-node { + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection 'upgrade'; + # proxy_set_header X-Forwarded-For $remote_addr; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header Host $host; + # + # proxy_pass http://frontend:3000; + # proxy_redirect off; + #} + + access_log /var/log/nginx/access.log main; +} \ No newline at end of file