Update port and configure FORCE_SCRIPT_NAME
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 25s
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 25s
This commit is contained in:
parent
663e3cdbd7
commit
8fe7895065
3 changed files with 69 additions and 1 deletions
|
|
@ -133,6 +133,7 @@ USE_TZ = True
|
||||||
# https://docs.djangoproject.com/en/6.1/howto/static-files/
|
# https://docs.djangoproject.com/en/6.1/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = 'static/'
|
STATIC_URL = 'static/'
|
||||||
|
FORCE_SCRIPT_NAME = '/emailservice'
|
||||||
MEDIA_URL = 'media/'
|
MEDIA_URL = 'media/'
|
||||||
MEDIA_ROOT = BASE_DIR / 'media'
|
MEDIA_ROOT = BASE_DIR / 'media'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ User=ubuntu
|
||||||
WorkingDirectory=/home/ubuntu/emailservice
|
WorkingDirectory=/home/ubuntu/emailservice
|
||||||
EnvironmentFile=/home/ubuntu/emailservice/.env
|
EnvironmentFile=/home/ubuntu/emailservice/.env
|
||||||
ExecStart=/home/ubuntu/emailservice/venv/bin/gunicorn core.wsgi:application \
|
ExecStart=/home/ubuntu/emailservice/venv/bin/gunicorn core.wsgi:application \
|
||||||
--bind 0.0.0.0:8081 \
|
--bind 0.0.0.0:8091 \
|
||||||
--workers 3 \
|
--workers 3 \
|
||||||
--access-logfile /home/ubuntu/emailservice/logs/gunicorn-access.log \
|
--access-logfile /home/ubuntu/emailservice/logs/gunicorn-access.log \
|
||||||
--error-logfile /home/ubuntu/emailservice/logs/gunicorn-error.log \
|
--error-logfile /home/ubuntu/emailservice/logs/gunicorn-error.log \
|
||||||
|
|
|
||||||
67
scratch/nginx_default
Normal file
67
scratch/nginx_default
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
server_name _;
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl default_server;
|
||||||
|
listen [::]:443 ssl default_server;
|
||||||
|
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
ssl_certificate /etc/nginx/ssl/chained.crt;
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/private.key;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
|
root /var/www/html;
|
||||||
|
index index.html index.htm index.nginx-debian.html;
|
||||||
|
|
||||||
|
location /api/v1/customer/ {
|
||||||
|
proxy_pass http://127.0.0.1:8082/api/v1/customer/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /emailservice/ {
|
||||||
|
proxy_pass http://127.0.0.1:8091/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /crm {
|
||||||
|
proxy_pass http://127.0.0.1:8081;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /dolibarrbeta {
|
||||||
|
root /var/www/html;
|
||||||
|
index index.php;
|
||||||
|
try_files $uri $uri/ /dolibarrbeta/index.php?$args;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
|
||||||
|
fastcgi_read_timeout 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:8080;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue