Skip to content

Commit

Permalink
[Changed]Change site conf
Browse files Browse the repository at this point in the history
  • Loading branch information
rushairer committed Jan 17, 2021
1 parent 9362a8f commit 48705f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
13 changes: 3 additions & 10 deletions src/nginx/sites/api.conf
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
upstream php-upstream {
server php-fpm:9000;
}

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

listen 80;
server_name api.apigg.xyz;
root /var/www/laravel/public;
index index.php index.html index.htm;

location / {
try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fixes timeouts
#fixes timeouts
fastcgi_read_timeout 600;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}

location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/;
log_not_found off;
}
}
}
10 changes: 4 additions & 6 deletions src/nginx/sites/default.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
server {
listen 80;
server_name apigg.xyz;
root /var/www/vue-mars/dist;

listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/vue-mars/dist;
location / {
try_files $uri $uri/ /index.html;
}

location ~ ^/api/* {
proxy_redirect off;
proxy_set_header Host 'api.apigg.xyz';
Expand All @@ -15,4 +13,4 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://nginx;
}
}
}

0 comments on commit 48705f3

Please sign in to comment.