Skip to content

Commit

Permalink
Update nginx config to refect recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Aug 30, 2018
1 parent 6178c1e commit 0ce9ff3
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions nginx-site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
server {
listen 443 ssl http2;
server_name tempfiles.carlgo11.com www.tempfiles.carlgo11.com;

root /var/www/tempfiles/backend;
index index.php;
include /etc/nginx/conf.d/headers.conf;

ssl_certificate /etc/letsencrypt/live/tempfiles.carlgo11.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tempfiles.carlgo11.com/privkey.pem;
ssl_ciphers 'AES256+EECDH:AES256+EDH';
ssl_protocols TLSv1.2 TLSv1.3;

error_log /var/log/nginx/tempfiles.carlgo11.com/error.log warn;

client_body_buffer_size 12M;
client_max_body_size 12M;

location / {
proxy_pass http://127.0.0.1:4000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /api {
root /var/www/html/tempfiles/backend;
rewrite ^/(.*)+$ /API.php?$1;
}

location ~* ^/(download|d)/ {
root /var/www/html/temfiles/backend;
rewrite ^/(.*)+$ /download.php?$1;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/tempfiles.carlgo11.com/php7.0-fpm.sock;

# Env vars
fastcgi_param ag44jc7aqs2rsup2bb6cx7utc 'localhost';
fastcgi_param hp7wz20wu4qfbfcmqywfai1j4 'tempfiles';
fastcgi_param mom8c5hrbn8c1r5lro1imfyax 'password';
fastcgi_param qb1yi60nrz3tjjjqqb7l2yqra 'tempfiles';
fastcgi_param rb421p9wniz81ttj7bdgrg0ub 'files';
}
}

# HTTP config
server {
listen 80;
server_name tempfiles.carlgo11.com www.tempfiles.carlgo11.com;

return 301 https://tempfiles.carlgo11.com;
}

0 comments on commit 0ce9ff3

Please sign in to comment.