mbolli / nfsen-ng

Responsive NetFlow visualizer built on top of nfdump tools.
Apache License 2.0
232 stars 44 forks source link

nginx example config #41

Closed zavndw closed 4 years ago

zavndw commented 4 years ago

Please tell me if there is a configuration example for nginx?

zavndw commented 4 years ago

This is how it works:

location / {                                                                                                                                                                                                                          
    root   /srv/http/nfsen-ng;                                                                                                                                                                                                        
    index  index.html;                                                                                                                                                                                                                
    if (!-e $request_filename) {                                                                                                                                                                                                      
        rewrite ^/api/(.*)$ /backend/index.php?request=$1 break;                                                                                                                                                            
    }                                                                                                                                                                                                                 
    rewrite ^/$ /frontend break;                                                                                                                                                                                                     
}