diff --git a/src/nginx/sites/api.conf b/src/nginx/sites/api.conf index 83d64ad..bafd07a 100644 --- a/src/nginx/sites/api.conf +++ b/src/nginx/sites/api.conf @@ -1,19 +1,14 @@ 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; @@ -21,17 +16,15 @@ server { 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; } -} \ No newline at end of file +} diff --git a/src/nginx/sites/default.conf b/src/nginx/sites/default.conf index 0baa0e1..4101090 100644 --- a/src/nginx/sites/default.conf +++ b/src/nginx/sites/default.conf @@ -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'; @@ -15,4 +13,4 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://nginx; } -} \ No newline at end of file +}