nginx.conf 1.06 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
events {}

daemon off;

error_log /dev/stderr info;

pid /run/nginx.pid;

http {
    access_log /dev/stdout;

Joakim Saario's avatar
Joakim Saario committed
12
13
14
    ssl_certificate /etc/nginx/ssl/cert.crt;
    ssl_certificate_key /etc/nginx/ssl/cert.key;

Joakim Saario's avatar
Joakim Saario committed
15
16
    include mime.types;

17
18
19
    server {
        listen 8080;

Joakim Saario's avatar
Joakim Saario committed
20
21
22
23
24
25
26
27
28
29
30
31
        return 302 https://$host:8443$request_uri;
    }

    server {
        listen 8081;

        return 302 https://$host:8444$request_uri;
    }

    server {
        listen 8443 ssl;

Joakim Saario's avatar
Joakim Saario committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
        root   /aurweb/web/html;
        index  index.php;

        location ~ ^/[^/]+\.php($|/) {
            fastcgi_pass aurweb-php:9000;
            fastcgi_index index.php;
            fastcgi_split_path_info ^(/[^/]+\.php)(/.*)$;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            include fastcgi_params;
        }

        location ~ .* {
            rewrite ^/(.*)$ /index.php/$1 last;
46
        }
Joakim Saario's avatar
Joakim Saario committed
47
    }
48

Joakim Saario's avatar
Joakim Saario committed
49
50
51
52
    server {
        listen 8444 ssl;

        location / {
Joakim Saario's avatar
Joakim Saario committed
53
            proxy_pass http://aurweb-fastapi:8001;
54
55
56
        }
    }
}