summaryrefslogtreecommitdiff
path: root/conf/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf/nginx.conf')
-rw-r--r--conf/nginx.conf40
1 files changed, 21 insertions, 19 deletions
diff --git a/conf/nginx.conf b/conf/nginx.conf
index bbab6f0..45a98eb 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,7 +1,6 @@
-user www-data;
+user dumpfmprod;
worker_processes 5;
-
-error_log /var/log/nginx/error.log;
+error_log /home/dumpfmprod/prod/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
@@ -10,9 +9,8 @@ events {
}
http {
- include /etc/nginx/mime.types;
-
- access_log /var/log/nginx/access.log;
+ include /etc/nginx/mime.types;
+ access_log /home/dumpfmprod/prod/log/nginx/error.log;
sendfile on;
#tcp_nopush on;
@@ -27,20 +25,24 @@ http {
include /etc/nginx/conf.d/*.conf;
server {
- listen 80;
+ listen 80;
+ server_name .dump.fm;
- location ^~* ^/(avatars|images)/ {
- root /home/ubuntu/dumpfm;
- expires 30d;
- }
+ location ~* /(avatars|images)/ {
+ root /home/dumpfmprod/prod;
+ expires 30d;
+ }
- location ^~* ^/static/ {
- root /home/ubuntu/dumpfm;
- expires 30m;
- }
+ location ~* /static/ {
+ root /home/dumpfmprod/prod;
+ expires 5m;
+ }
- location / {
- proxy_pass http://127.0.0.1:8080;
- }
+ location / {
+ proxy_pass http://127.0.0.1:8080;
+ proxy_redirect off;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ }
}
-}
+} \ No newline at end of file