mlazarov / supervisord-monitor

Supervisord Monitoring Tool
947 stars 224 forks source link

Could you provide a ngnix config demo #23

Open JayMiao opened 8 years ago

JayMiao commented 8 years ago

Excuse my newbie. I've use this monitor under the ngnix config. `server { listen 80; server_name supervisord.add.net; root /home/q/server/supervisord-monitor/public_html; index index.php;

location = /ENV {
    allow 127.0.0.1;
    deny all;
}

location ~* \.php$ {
    include fastcgi.conf;
    include include/supervisord.add.net/env.conf;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
}

}`

But, when I choose to stop/start a progress. The got a ngnix error code : 404 Could you please provide a ngnix config file demo for you project ? THANKS

mlazarov commented 8 years ago

To work supervisord-monitor requires one additional location directive. This is how your vhost will look after adding it:

location = /ENV {
    allow 127.0.0.1;
    deny all;
}

location / {
    try_files $uri $uri/ /index.php;
 }

location ~* \.php$ {
    include fastcgi.conf;
    include include/supervisord.add.net/env.conf;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
}
JayMiao commented 8 years ago

Yeah ! I just resolve the 404 problem according to Ngnix Official Doc. I find the project written in CI framework. Could you please put the link CI ngnix in your README.md ?