ReJeCtAll / naxsi

Automatically exported from code.google.com/p/naxsi
Other
0 stars 0 forks source link

database emmpty #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello i have installed nginx with naxsi-ui
my nx_intercept do not feel the databases
and when i try to acces to localhost:8081 it says Your database seems to be 
empty.
how can i fix it?

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide your nginx configuration any additional information below.

Original issue reported on code.google.com by dim...@gmail.com on 28 Nov 2012 at 8:11

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, 
Can you provide your nginx + naxsi configuration ? 

Original comment by sephirot...@gmail.com on 28 Nov 2012 at 8:18

GoogleCodeExporter commented 8 years ago
here ares all my configuration

Original comment by dim...@gmail.com on 28 Nov 2012 at 11:50

Attachments:

GoogleCodeExporter commented 8 years ago
nx_intercept is listening on port 8082, and you do a proxy pass to port 8080 in 
your RequestDenied location.
Change the port to 8082, and it should work.

Original comment by sephirot...@gmail.com on 29 Nov 2012 at 9:16

GoogleCodeExporter commented 8 years ago
Ok thank you it works. and how can I perform the learning mode?

Original comment by dim...@gmail.com on 29 Nov 2012 at 11:53

GoogleCodeExporter commented 8 years ago
You will find every informations you need in the wiki 
(https://code.google.com/p/naxsi/wiki/TableOfContents).

Original comment by sephirot...@gmail.com on 29 Nov 2012 at 1:39

GoogleCodeExporter commented 8 years ago
i have already read this but i do not see how to add rules to naxsi?

Original comment by dim...@gmail.com on 29 Nov 2012 at 1:53

GoogleCodeExporter commented 8 years ago
We met same problem. 

Our environment : 
ubuntu 12.04 LTS by using the following ppa : 
http://ppa.launchpad.net/nginx/stable/ubuntu precise main

So we use : 
nginx version: nginx/1.2.4

We noticed a problem by using Mysql 5.5 (ubuntu precise official package) and 
naxsi scripts. When we ran the scripts, no row was added on mysql database. 

We modified the following script : 
/usr/share/nginx-naxsi/naxsi-ui/SQLWrapper.py 

by changing method => :
    def StartInsert(self):
        if self.dbtype == 'sqlite':
            self.__conn.execute("BEGIN")
        if self.dbtype == 'mysql':
            self.__cursor.execute("BEGIN;")

    def StopInsert(self):
        if self.dbtype == 'sqlite':
            self.__conn.commit()
        if self.dbtype == 'mysql':
            self.__cursor.execute("COMMIT;")

I don't know if it's the best things to do but it works now. 

Original comment by julien.l...@gmail.com on 30 Nov 2012 at 3:51