nginx config for the website
1 changed files with 17 additions and 0 deletions
nginx/glibcode.conf ADDED
View File
| @@ -0,0 +1,17 @@ | ||
| 1 | +server { | |
| 2 | + listen 443 ssl http2; | |
| 3 | + server_name glibcode.net www.glibcode.net; | |
| 4 | + root /var/www/glibcode/current/public; | |
| 5 | + | |
| 6 | + ssl_certificate /etc/letsencrypt/live/glibcode.net/fullchain.pem; | |
| 7 | + ssl_certificate_key /etc/letsencrypt/live/glibcode.net/privkey.pem; | |
| 8 | + | |
| 9 | + index index.php; | |
| 10 | + location / { | |
| 11 | + try_files $uri $uri/ /index.php?$query_string; | |
| 12 | + } | |
| 13 | + location ~ \.php$ { | |
| 14 | + include snippets/fastcgi-php.conf; | |
| 15 | + fastcgi_pass unix:/run/php/php7.4-fpm.sock; | |
| 16 | + } | |
| 17 | +} | |