adding config for arch linux and nginx
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
#make sure in nginx.conf has include module.d/*.conf inside http block one.
|
||||
server {
|
||||
listen 80; #make nginx out side listen 82;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
location /familytreeapi/ {
|
||||
#proxy_pass http://127.0.0.1:5015;
|
||||
proxy_pass http://192.168.1.219:5015/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection keep-alive;
|
||||
@@ -13,20 +14,23 @@
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /familytreeui {
|
||||
return 301 /familytreeui/; #if same one redirect to /familytreeui/
|
||||
}
|
||||
location /familytreeui/ {
|
||||
root /var/www/familytree; #path must exist like /var/www/familytree/familytreeui and /var/www/familytree/api folder.
|
||||
index index.html
|
||||
root /var/www/familytree/; #path must exist like /var/www/familytree/familytreeui and /var/www/familytree/api folder.
|
||||
#index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
|
||||
# Optional: Cache static assets for better performance
|
||||
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
#location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
||||
# expires 30d;
|
||||
# add_header Cache-Control "public";
|
||||
#}
|
||||
|
||||
error_page 404 /index.html;
|
||||
# error_page 404 /index.html;
|
||||
|
||||
# put in /etc/nginx/sites-availalble/familytreeapp.conf
|
||||
# link to enable
|
||||
|
||||
Reference in New Issue
Block a user