Move nginx configs and update makefile (crypto lib)
[matches/MCTX3420.git] / nginx-configs / sites-enabled / mctxconfig
1 # You may add here your
2 # server {
3 #       ...
4 # }
5 # statements for each of your virtual hosts to this file
6
7 ##
8 # You should look at the following URL's in order to grasp a solid understanding
9 # of Nginx configuration files in order to fully unleash the power of Nginx.
10 # http://wiki.nginx.org/Pitfalls
11 # http://wiki.nginx.org/QuickStart
12 # http://wiki.nginx.org/Configuration
13 #
14 # Generally, you will want to move this file somewhere, and start with a clean
15 # file but keep this around for reference. Or just disable in sites-enabled.
16 #
17 # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
18 ##
19
20 server {
21         listen 80;
22         listen [::]:80 default_server ipv6only=on;
23
24         root /usr/share/nginx/html;
25         index index.php index.html index.htm;
26
27         # Make site accessible from http://localhost/
28         server_name localhost;
29
30         location / {
31                 # First attempt to serve request as file, then
32                 # as directory, then fall back to displaying a 404.
33                 try_files $uri $uri/ =404;
34                 # Uncomment to enable naxsi on this location
35                 # include /etc/nginx/naxsi.rules
36         }
37
38         # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
39         #location /RequestDenied {
40         #       proxy_pass http://127.0.0.1:8080;    
41         #}
42
43         #error_page 404 /404.html;
44
45         # redirect server error pages to the static page /50x.html
46         #
47         #error_page 500 502 503 504 /50x.html;
48         #location = /50x.html {
49         #       root /usr/share/nginx/html;
50         #}
51
52         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
53         #
54         location ~ \.php$ {
55                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
56         #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
57         #
58         #       # With php5-cgi alone:
59         #       fastcgi_pass 127.0.0.1:9000;
60         #       # With php5-fpm:
61                 fastcgi_pass unix:/var/run/php5-fpm.sock;
62                 fastcgi_index index.php;
63                 include fastcgi_params;
64         }
65
66         # deny access to .htaccess files, if Apache's document root
67         # concurs with nginx's one
68         #
69         location ~ /\.ht {
70                 deny all;
71         }
72         
73         #Login area
74         location ^~ /api/login {
75                 auth_basic "Restricted Access";
76                 auth_basic_user_file /usr/share/nginx/access/.htpasswd;
77         
78                 fastcgi_pass 127.0.0.1:9005;
79                 fastcgi_param DOCUMENT_URI_LOCAL login;
80                 include fastcgi_params;
81         }
82         
83         #MCTX API
84         location /api {
85                 location ~ ^/api/?([^?]*) {
86                         fastcgi_pass 127.0.0.1:9005;
87                         fastcgi_param DOCUMENT_URI_LOCAL $1;
88                         include fastcgi_params;
89                 }
90         }
91 }
92
93
94 # another virtual host using mix of IP-, name-, and port-based configuration
95 #
96 #server {
97 #       listen 8000;
98 #       listen somename:8080;
99 #       server_name somename alias another.alias;
100 #       root html;
101 #       index index.html index.htm;
102 #
103 #       location / {
104 #               try_files $uri $uri/ =404;
105 #       }
106 #}
107
108
109 # HTTPS server
110 #
111 #server {
112 #       listen 443;
113 #       server_name localhost;
114 #
115 #       root html;
116 #       index index.html index.htm;
117 #
118 #       ssl on;
119 #       ssl_certificate cert.pem;
120 #       ssl_certificate_key cert.key;
121 #
122 #       ssl_session_timeout 5m;
123 #
124 #       ssl_protocols SSLv3 TLSv1;
125 #       ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
126 #       ssl_prefer_server_ciphers on;
127 #
128 #       location / {
129 #               try_files $uri $uri/ =404;
130 #       }
131 #}

UCC git Repository :: git.ucc.asn.au