forked from PodcastGenerator/PodcastGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
podcastgenerator-nginx.conf
38 lines (33 loc) · 1.58 KB
/
podcastgenerator-nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
server {
# 301 redirect users to an encrypted version of the page
# Change example.com to the domain where podcast-generator will be running
# You need to disable this and change the line "listen 443 ssl" in the following block to "listen 80" if you wish an unencrypted only page
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}
server {
# Main server block config
# Change example.com to the domain where podcast-generator will be running
listen 443 ssl;
server_name example.com;
# Set nginx max_body_size attribute to 1 GB to prevent php timeout errors
# This is necessary so the upload in the admin panel works reliably
client_max_body_size 1G;
location / {
# Change your document root accordingly
root /var/www/html;
index index.php;
# Set proxy_read_timeout attribute to 1 hour
# Prevents nginx from reinitiating the server connection because it thinks PHP is timing out
proxy_read_timeout 3600;
# default PHP enable snipped - change according to the configuration your OS uses
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
}
}