You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
999 B
Nginx Configuration File
36 lines
999 B
Nginx Configuration File
# Example nginx virtual host configuration file for a Debian server running PHP 7.4 FPM.
|
|
# SSL is optional (curl doesn't use it if you just toss a domain without protocol at it
|
|
# anyway) but best practice i guess. Just make sure you're not *forcefully* redirecting
|
|
# HTTP to HTTPS, because curl also doesn't follow redirects by default.
|
|
|
|
server {
|
|
listen 80;
|
|
listen 443 ssl http2;
|
|
|
|
# IPv6 is important!
|
|
listen [::]:80;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name example.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
|
|
|
|
root /var/www;
|
|
index index.php;
|
|
access_log off;
|
|
error_log off;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
# i have no idea what like half of these options do lmao
|
|
include fastcgi_params;
|
|
try_files $fastcgi_script_name =404;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
|
}
|
|
}
|