mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-13 19:13:42 +02:00
Added "api" server and HTTP/2 listeners
Added servers for "api.victorwesterlund.com" along with an HTTP/2 listener for both 'api' and 'www'. Added ".well-known/" to gitignore
This commit is contained in:
parent
ed5bda63b0
commit
919f0fa13b
2 changed files with 43 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -0,0 +1 @@
|
|||
.well-known/
|
44
server.conf
44
server.conf
|
@ -1,3 +1,5 @@
|
|||
# == victorwesterlund.com ==
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
@ -8,8 +10,8 @@ server {
|
|||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name www.victorwesterlund.com;
|
||||
|
||||
|
@ -33,3 +35,41 @@ server {
|
|||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
# == api.victorwesterlund.com ==
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name api.victorwesterlund.com;
|
||||
|
||||
return 301 https://api.victorwesterlund.com$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name api.victorwesterlund.com;
|
||||
|
||||
ssl on;
|
||||
include snippets/ssl.conf;
|
||||
|
||||
root /var/www/github_victorwesterlund_victorwesterlund.com/api;
|
||||
|
||||
location \ {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
||||
}
|
||||
|
||||
location ~ /\.git {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue