4 #Change this to match your root directory
5 root /usr/share/nginx/www;
6 index index.php index.html index.htm;
8 # Make site accessible from http://localhost/
12 # First attempt to serve request as file, then
13 # as directory, then fall back to displaying a 404.
14 try_files $uri $uri/ =404;
15 # Uncomment to enable naxsi on this location
16 # include /etc/nginx/naxsi.rules
19 # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
20 #location /RequestDenied {
21 # proxy_pass http://127.0.0.1:8080;
24 #error_page 404 /404.html;
26 # redirect server error pages to the static page /50x.html
28 #error_page 500 502 503 504 /50x.html;
29 #location = /50x.html {
30 # root /usr/share/nginx/html;
33 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
36 fastcgi_split_path_info ^(.+\.php)(/.+)$;
37 # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
39 # # With php5-cgi alone:
40 # fastcgi_pass 127.0.0.1:9000;
42 fastcgi_pass unix:/var/run/php5-fpm.sock;
43 fastcgi_index index.php;
44 include fastcgi_params;
47 # deny access to .htaccess files, if Apache's document root
48 # concurs with nginx's one
57 location ^~ /api/control {
58 #Uncomment to add back login
59 #auth_basic "Restricted Access";
60 #auth_basic_user_file /usr/share/nginx/access/.htpasswd;
62 fastcgi_pass 127.0.0.1:9005;
63 fastcgi_param DOCUMENT_URI_LOCAL control;
64 include fastcgi_params;
68 location ^~ /api/log {
69 alias /var/log/mctxserv.log;
70 default_type text/plain;
74 location ^~ /api/errorlog {
75 alias /var/log/mctxserv-error.log;
76 default_type text/plain;
79 location ~ ^/api/?([^?]*) {
80 fastcgi_pass 127.0.0.1:9005;
81 fastcgi_param DOCUMENT_URI_LOCAL $1;
82 include fastcgi_params;
88 # another virtual host using mix of IP-, name-, and port-based configuration
92 # listen somename:8080;
93 # server_name somename alias another.alias;
95 # index index.html index.htm;
98 # try_files $uri $uri/ =404;
107 # server_name localhost;
110 # index index.html index.htm;
113 # ssl_certificate cert.pem;
114 # ssl_certificate_key cert.key;
116 # ssl_session_timeout 5m;
118 # ssl_protocols SSLv3 TLSv1;
119 # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
120 # ssl_prefer_server_ciphers on;
123 # try_files $uri $uri/ =404;