2 #Redirect HTTP to HTTPS
4 return 301 https://$host$request_uri;
11 ssl_certificate /usr/share/nginx/conf/server.crt;
12 ssl_certificate_key /usr/share/nginx/conf/server.key;
14 ssl_session_timeout 5m;
16 ssl_protocols SSLv3 TLSv1;
17 ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
18 ssl_prefer_server_ciphers on;
20 #Change this to match your root directory
21 root /usr/share/nginx/www;
22 index index.php index.html index.htm;
24 # Make site accessible from http://localhost/
25 server_name localhost;
28 # First attempt to serve request as file, then
29 # as directory, then fall back to displaying a 404.
30 try_files $uri $uri/ =404;
31 # Uncomment to enable naxsi on this location
32 # include /etc/nginx/naxsi.rules
35 # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
36 #location /RequestDenied {
37 # proxy_pass http://127.0.0.1:8080;
40 #error_page 404 /404.html;
42 # redirect server error pages to the static page /50x.html
44 #error_page 500 502 503 504 /50x.html;
45 #location = /50x.html {
46 # root /usr/share/nginx/html;
49 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
52 fastcgi_split_path_info ^(.+\.php)(/.+)$;
53 # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
55 # # With php5-cgi alone:
56 # fastcgi_pass 127.0.0.1:9000;
58 fastcgi_pass unix:/var/run/php5-fpm.sock;
59 fastcgi_index index.php;
60 include fastcgi_params;
63 # deny access to .htaccess files, if Apache's document root
64 # concurs with nginx's one
73 location ^~ /api/control {
74 #Uncomment to add back login
75 #auth_basic "Restricted Access";
76 #auth_basic_user_file /usr/share/nginx/access/.htpasswd;
78 fastcgi_pass 127.0.0.1:9005;
79 fastcgi_param DOCUMENT_URI_LOCAL control;
80 include fastcgi_params;
85 alias /var/log/mctxserv.log;
86 default_type text/plain;
90 location = /api/errorlog {
91 alias /var/log/mctxserv-error.log;
92 default_type text/plain;
95 location ~ ^/api/?([^?]*) {
96 fastcgi_pass 127.0.0.1:9005;
97 fastcgi_param DOCUMENT_URI_LOCAL $1;
98 include fastcgi_params;
104 # another virtual host using mix of IP-, name-, and port-based configuration
108 # listen somename:8080;
109 # server_name somename alias another.alias;
111 # index index.html index.htm;
114 # try_files $uri $uri/ =404;
123 # server_name localhost;
126 # index index.html index.htm;
129 # ssl_certificate cert.pem;
130 # ssl_certificate_key cert.key;
132 # ssl_session_timeout 5m;
134 # ssl_protocols SSLv3 TLSv1;
135 # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
136 # ssl_prefer_server_ciphers on;
139 # try_files $uri $uri/ =404;