cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

middleware:web:nginx:conf:codeigniter.html



Nginx

Nginx Sample Configuration of DokuWiki

server {
    listen   80;
    server_name  demo.oreda.net;

    access_log  /var/log/nginx/demo.access.log;
    error_log   /var/log/nginx/demo.error.log;

    root    /usr/share/nginx/html/demo;

    auth_basic "Restricted";
    auth_basic_user_file /etc/nginx/htpasswd;


    location / {
        index index.php index.html index.htm;
        if (-f $request_filename) {
            expires 30d;
            break;
        }
        if (!-e $request_filename) {
            rewrite ^(.+)$ /index.php?$1 last;
        }
    }

    location ~ \.php$ {
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_index   index.php;
        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include         fastcgi_params;
    }


    location ~ /\.ht {
        deny  all;
    }

    location ~ ^/(application/system)/ {
        deny all;
    }

    location ~ application/.* { deny all; }
    location ~ system/.* { deny all; }
    location ~ /\.ht { deny all; }

}





Nginx




middleware/web/nginx/conf/codeigniter.html.txt ยท Last modified: 2017/08/10 by admin

Page Tools